Skip to content

Commit

Permalink
Fix issue #1448: wrong Engine's version (#1449)
Browse files Browse the repository at this point in the history
Co-authored-by: Thierry Boileau <[email protected]>
  • Loading branch information
thboileau and Thierry Boileau authored Jan 28, 2025
1 parent 679ab1f commit b237642
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 12 deletions.
6 changes: 5 additions & 1 deletion changes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
Changes log
===========

- 2.5.1 (28-01-2025)
- Bugs fixed
- Fixed Engine's version. Issue #1448

- 2.5.0 (27-12-2024)
- Security
- Spring Framework before 6.0.0 suffers from a potential remote code execution (RCE) issue if used for Java deserialization
of untrusted data. Depending on how the library is implemented within a product, this issue may or not occur, and
authentication may be required. Restlet Framework isn't able to upgrade to Spring Framewortk version 6.0 due to its
authentication may be required. Restlet Framework isn't able to upgrade to Spring Framework version 6.0 due to its
requirement to use Java 8. If you are running Java 17+, please override the Spring dependency in your POM to version 6.0+
- Bugs fixed
- Fixed serialization issues in the GWT edition between client and server sides.
Expand Down
12 changes: 12 additions & 0 deletions org.restlet.gwt/org.restlet.gwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,20 @@
<artifactId>gwt-dev</artifactId>
<version>${lib-gwt-version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${lib-junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ public final class Status {

private static final String BASE_HTTP = "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html";

private static final String BASE_RESTLET = "http://restlet.org/learn/javadocs/"
+ Engine.MAJOR_NUMBER
+ '.'
+ Engine.MINOR_NUMBER
+ "/gwt/api/";
private static final String BASE_RESTLET = "https://javadoc.io/static/org.restlet.gwt/org.restlet.gwt/" + Engine.VERSION + "/";

@Deprecated
private static final String BASE_WEBDAV = "http://www.webdav.org/specs/rfc2518.html";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public class Engine {
public static final String MAJOR_NUMBER = "2";

/** Minor version number. */
public static final String MINOR_NUMBER = "4";
public static final String MINOR_NUMBER = "5";

/** Release number. */
public static final String RELEASE_NUMBER = ".4";
public static final String RELEASE_NUMBER = "-SNAPSHOT";


/** Complete version. */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright 2005-2024 Qlik
*
* The contents of this file is subject to the terms of the Apache 2.0 open
* source license available at http://www.opensource.org/licenses/apache-2.0
*
* Restlet is a registered trademark of QlikTech International AB.
*/

package org.restlet.client.engine;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class EngineTest {

@Test
public void engineVersionShouldBeEqualToMavenProjectVersion() {
// When I retrieve the Maven project's version as stated in the pom file.
Properties properties = new Properties();
try (InputStream resourceAsStream = EngineTest.class.getClassLoader().getResourceAsStream("maven-version.properties")) {
properties.load(resourceAsStream);
} catch (IOException e) {
Assertions.fail("Can't load the properties file that contain the Maven's project version");
}

// Then the Maven project's version should be equal to the Engine's version.
assertEquals(Engine.VERSION, properties.getProperty("maven.version"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
maven.version=${project.version}
6 changes: 6 additions & 0 deletions org.restlet.java/org.restlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public final class Status {

private static final String BASE_HTTP = "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html";

private static final String BASE_RESTLET = "https://javadocs.restlet.talend.com/" + Engine.MAJOR_NUMBER + '.'
+ Engine.MINOR_NUMBER + "/api/";
private static final String BASE_RESTLET = "https://javadoc.io/static/org.restlet/org.restlet/" + Engine.VERSION + "/";

@Deprecated
private static final String BASE_WEBDAV = "http://www.webdav.org/specs/rfc2518.html";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public class Engine {
public static final String MINOR_NUMBER = "5";

/** Release number. */
public static final String RELEASE_NUMBER = "-RC1";
public static final String RELEASE_NUMBER = "-SNAPSHOT";

/** The org.restlet log level . */
/** The org.restlet log level. */
private static volatile Level restletLogLevel;

/** Complete version. */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright 2005-2024 Qlik
*
* The contents of this file is subject to the terms of the Apache 2.0 open
* source license available at http://www.opensource.org/licenses/apache-2.0
*
* Restlet is a registered trademark of QlikTech International AB.
*/

package org.restlet.engine;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class EngineTest {

@Test
public void engineVersionShouldBeEqualToMavenProjectVersion() {
// When I retrieve the Maven project's version as stated in the pom file.
Properties properties = new Properties();
try (InputStream resourceAsStream = EngineTest.class.getClassLoader().getResourceAsStream("maven-version.properties")) {
properties.load(resourceAsStream);
} catch (IOException e) {
Assertions.fail("Can't load the properties file that contain the Maven's project version");
}

// Then the Maven project's version should be equal to the Engine's version.
assertEquals(Engine.VERSION, properties.getProperty("maven.version"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
maven.version=${project.version}

0 comments on commit b237642

Please sign in to comment.