Skip to content

Commit bffeba3

Browse files
authored
Merge pull request quarkusio#50351 from gsmet/jdk-25-compatibility
Fix a few issues with Java 25 compatibility and include Java 25 in CI
2 parents fae46f4 + 4863efe commit bffeba3

File tree

8 files changed

+89
-12
lines changed

8 files changed

+89
-12
lines changed

.github/matrix-jvm-tests.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
"os-name": "ubuntu-latest",
1919
"modules": "-pl\n!docs\n-Dno-test-modules"
2020
},
21+
{
22+
"name": "JVM Tests - JDK 25",
23+
"category": "Runtime",
24+
"java-version": 25,
25+
"java-version-gradle": 17,
26+
"maven_args": "$JVM_TEST_MAVEN_ARGS",
27+
"maven_opts": "-Xmx3g -XX:MaxMetaspaceSize=1g",
28+
"os-name": "ubuntu-latest",
29+
"modules": "-pl\n!docs\n-Dno-test-modules"
30+
},
2131
{
2232
"name": "JVM Tests - JDK 17 Windows",
2333
"category": "Runtime",
@@ -40,7 +50,15 @@
4050
"name": "JVM Integration Tests - JDK 21",
4151
"category": "Integration",
4252
"java-version": 21,
43-
"java-version-gradle": 20,
53+
"maven_args": "$JVM_TEST_MAVEN_ARGS",
54+
"maven_opts": "-Xmx3g -XX:MaxMetaspaceSize=1g",
55+
"os-name": "ubuntu-latest",
56+
"modules": "-f\nintegration-tests\n-pl\n!gradle\n-pl\n!maven\n-pl\n!devmode\n-pl\n!devtools"
57+
},
58+
{
59+
"name": "JVM Integration Tests - JDK 25",
60+
"category": "Integration",
61+
"java-version": 25,
4462
"maven_args": "$JVM_TEST_MAVEN_ARGS",
4563
"maven_opts": "-Xmx3g -XX:MaxMetaspaceSize=1g",
4664
"os-name": "ubuntu-latest",

extensions/smallrye-reactive-messaging-amqp/deployment/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,20 @@
118118
</plugin>
119119
</plugins>
120120
</build>
121+
122+
<profiles>
123+
<!--
124+
Artemis requires the SecurityManager and it is not available anymore in Java 25
125+
See https://issues.apache.org/jira/browse/ARTEMIS-4975
126+
-->
127+
<profile>
128+
<id>skip-artemis-on-java25</id>
129+
<activation>
130+
<jdk>[25,)</jdk>
131+
</activation>
132+
<properties>
133+
<skipTests>true</skipTests>
134+
</properties>
135+
</profile>
136+
</profiles>
121137
</project>

extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/security/FluentApiMTLSAuthenticationRequiredDevModeTest.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.quarkus.vertx.http.security;
22

3+
import static org.assertj.core.api.Assertions.assertThat;
34
import static org.hamcrest.Matchers.is;
45
import static org.junit.jupiter.api.Assertions.assertTrue;
56

@@ -65,8 +66,9 @@ void testCustomCertificateToRolesMapper(RepetitionInfo info) {
6566
.get(url);
6667
Assertions.fail("SSL handshake failure not detected");
6768
} catch (Exception e) {
68-
var sslHandshakeFailed = e.getMessage().contains("Received fatal alert: bad_certificate");
69-
assertTrue(sslHandshakeFailed, () -> "Expected SSL handshake failure, but got: " + e.getMessage());
69+
assertThat(e.getMessage())
70+
.containsAnyOf("Received fatal alert: bad_certificate", "Received fatal alert: certificate_required")
71+
.describedAs("Expected SSL handshake failure, but got: " + e);
7072
}
7173
}
7274

@@ -80,15 +82,17 @@ void testPublicPathRequiresClientAuth() {
8082
.get(url);
8183
Assertions.fail("SSL handshake failure not detected");
8284
} catch (Exception e) {
83-
var sslHandshakeFailed = e.getMessage().contains("Received fatal alert: bad_certificate");
84-
assertTrue(sslHandshakeFailed, () -> "Expected SSL handshake failure, but got: " + e.getMessage());
85+
assertThat(e.getMessage())
86+
.containsAnyOf("Received fatal alert: bad_certificate", "Received fatal alert: certificate_required")
87+
.describedAs("Expected SSL handshake failure, but got: " + e);
8588
}
8689
}
8790

8891
@Test
8992
void testInsecureRequestsDenied() {
9093
try {
91-
RestAssured.given().get(publicPath);
94+
URL url = correctPortIfNecessary(publicPath);
95+
RestAssured.given().get(url);
9296
Assertions.fail("Connection should be refused");
9397
} catch (Exception e) {
9498
var sslHandshakeFailed = e.getMessage().contains("Connection refused");

extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/security/FluentApiMTLSAuthenticationRequiredTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.quarkus.vertx.http.security;
22

3+
import static org.assertj.core.api.Assertions.assertThat;
34
import static org.hamcrest.Matchers.is;
45
import static org.junit.jupiter.api.Assertions.assertTrue;
56

@@ -60,8 +61,9 @@ void testCustomCertificateToRolesMapper() {
6061
.get(adminRoleTlsPath);
6162
Assertions.fail("SSL handshake failure not detected");
6263
} catch (Exception e) {
63-
var sslHandshakeFailed = e.getMessage().contains("Received fatal alert: bad_certificate");
64-
assertTrue(sslHandshakeFailed, () -> "Expected SSL handshake failure, but got: " + e.getMessage());
64+
assertThat(e.getMessage())
65+
.containsAnyOf("Received fatal alert: bad_certificate", "Received fatal alert: certificate_required")
66+
.describedAs("Expected SSL handshake failure, but got: " + e);
6567
}
6668
}
6769

@@ -74,8 +76,9 @@ void testPublicPathRequiresClientAuth() {
7476
.get(publicTlsPath);
7577
Assertions.fail("SSL handshake failure not detected");
7678
} catch (Exception e) {
77-
var sslHandshakeFailed = e.getMessage().contains("Received fatal alert: bad_certificate");
78-
assertTrue(sslHandshakeFailed, () -> "Expected SSL handshake failure, but got: " + e.getMessage());
79+
assertThat(e.getMessage())
80+
.containsAnyOf("Received fatal alert: bad_certificate", "Received fatal alert: certificate_required")
81+
.describedAs("Expected SSL handshake failure, but got: " + e);
7982
}
8083
}
8184

independent-projects/resteasy-reactive/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<!-- Versions -->
4646
<jakarta.enterprise.cdi-api.version>4.1.0</jakarta.enterprise.cdi-api.version>
4747
<jandex.version>3.5.0</jandex.version>
48-
<bytebuddy.version>1.15.11</bytebuddy.version>
48+
<bytebuddy.version>1.17.6</bytebuddy.version>
4949
<junit5.version>5.13.4</junit5.version>
5050
<maven.version>3.9.11</maven.version>
5151
<assertj.version>3.27.6</assertj.version>

integration-tests/infinispan-cache/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@
110110
</execution>
111111
</executions>
112112
</plugin>
113+
<plugin>
114+
<artifactId>maven-compiler-plugin</artifactId>
115+
<configuration>
116+
<annotationProcessorPaths>
117+
<path>
118+
<groupId>org.infinispan.protostream</groupId>
119+
<artifactId>protostream-processor</artifactId>
120+
</path>
121+
</annotationProcessorPaths>
122+
</configuration>
123+
</plugin>
113124
</plugins>
114125
</build>
115126

integration-tests/infinispan-client/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@
153153
<skip>true</skip>
154154
</configuration>
155155
</plugin>
156+
<plugin>
157+
<artifactId>maven-compiler-plugin</artifactId>
158+
<configuration>
159+
<annotationProcessorPaths>
160+
<path>
161+
<groupId>org.infinispan.protostream</groupId>
162+
<artifactId>protostream-processor</artifactId>
163+
</path>
164+
</annotationProcessorPaths>
165+
</configuration>
166+
</plugin>
156167
</plugins>
157168
</build>
158169

integration-tests/reactive-messaging-amqp/pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,19 @@
137137
</plugins>
138138
</build>
139139

140-
140+
<profiles>
141+
<!--
142+
Artemis requires the SecurityManager and it is not available anymore in Java 25
143+
See https://issues.apache.org/jira/browse/ARTEMIS-4975
144+
-->
145+
<profile>
146+
<id>skip-artemis-on-java25</id>
147+
<activation>
148+
<jdk>[25,)</jdk>
149+
</activation>
150+
<properties>
151+
<skipTests>true</skipTests>
152+
</properties>
153+
</profile>
154+
</profiles>
141155
</project>

0 commit comments

Comments
 (0)