This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 2c0617f33cf HDDS-15699. Check compilation targeting Java 25 (#10627)
2c0617f33cf is described below
commit 2c0617f33cff025f78b3090915bc8fa7f1687cca
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Jun 30 15:05:36 2026 +0200
HDDS-15699. Check compilation targeting Java 25 (#10627)
---
.github/workflows/ci.yml | 2 +-
.../hadoop/hdds/utils/db/StringCodecBase.java | 2 +-
.../hadoop/ozone/common/ChecksumByteBuffer.java | 6 ++---
.../validation/OMClientVersionValidator.java | 2 +-
.../validation/OMLayoutVersionValidator.java | 2 +-
pom.xml | 26 ++++++++++++++++++----
6 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6715b75ad3a..973fa30c0cf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -173,7 +173,7 @@ jobs:
if: needs.build-info.outputs.needs-compile == 'true'
strategy:
matrix:
- java: [ 8, 11, 17 ]
+ java: [ 8, 17, 25 ]
include:
- os: ubuntu-24.04
- java: 21
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/StringCodecBase.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/StringCodecBase.java
index 88beda1f49d..f64f1931831 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/StringCodecBase.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/db/StringCodecBase.java
@@ -78,7 +78,7 @@ CharsetDecoder newDecoder() {
* <p>
* For a fixed-length {@link Codec},
* each character is encoded to the same number of bytes and
- * {@link #getSerializedSizeUpperBound(String)} equals to the serialized
size.
+ * {@code getSerializedSizeUpperBound(String)} equals to the serialized size.
*/
public boolean isFixedLength() {
return fixedLength;
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChecksumByteBuffer.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChecksumByteBuffer.java
index 3a1d88d734d..fe89faa1929 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChecksumByteBuffer.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChecksumByteBuffer.java
@@ -34,11 +34,9 @@ public interface ChecksumByteBuffer extends Checksum {
* Upon return, the buffer's position will be equal to its limit.
*
* @param buffer the bytes to update the checksum with
- *
- * @apiNote {@link Override} annotation is missing since {@link
Checksum#update(ByteBuffer)} introduced only in Java9.
- * TODO: Remove when Java 1.8 support is dropped.
- * TODO: <a
href="https://issues.apache.org/jira/browse/HDDS-12366">HDDS-12366</a>
*/
+ // TODO HDDS-12366: Remove when Java 1.8 support is dropped.
+ // Cannot @Override, since introduced only in Java 9.
@SuppressWarnings("PMD.MissingOverride")
void update(ByteBuffer buffer);
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMClientVersionValidator.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMClientVersionValidator.java
index 015b67b47dd..5a3e23eda3f 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMClientVersionValidator.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMClientVersionValidator.java
@@ -96,7 +96,7 @@
/**
* The version before which the validator needs to run. The validator will
run only for requests
* having a version which precedes the specified version.
- * @returns the exclusive upper bound of the request's version under which
the validator is applicable.
+ * @return the exclusive upper bound of the request's version under which
the validator is applicable.
*/
ClientVersion applyBefore();
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMLayoutVersionValidator.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMLayoutVersionValidator.java
index 8dc624fe10b..8c211259aca 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMLayoutVersionValidator.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/validation/OMLayoutVersionValidator.java
@@ -101,7 +101,7 @@
/**
* The version before which the validator needs to run. The validator will
run only for requests
* having a version which precedes the specified version.
- * @returns the exclusive upper bound of the request's version under which
the validator is applicable.
+ * @return the exclusive upper bound of the request's version under which
the validator is applicable.
*/
OMLayoutFeature applyBefore();
diff --git a/pom.xml b/pom.xml
index 23faa614be3..987ace491bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,8 +36,8 @@
<aspectj-plugin.version>1.14.1</aspectj-plugin.version>
<aspectj.java11.version>1.9.20</aspectj.java11.version>
<aspectj.java21.version>1.9.24</aspectj.java21.version>
- <!-- Default aspectj version for java8 -->
- <aspectj.version>1.9.7</aspectj.version>
+ <aspectj.java25.version>1.9.25.1</aspectj.java25.version>
+ <aspectj.java8.version>1.9.7</aspectj.java8.version>
<assertj.version>3.27.7</assertj.version>
<aws-java-sdk.version>1.12.788</aws-java-sdk.version>
<bonecp.version>0.8.0.RELEASE</bonecp.version>
@@ -2648,6 +2648,15 @@
</build>
</profile>
<!-- Profiles for specific aspectj versions -->
+ <profile>
+ <id>aspectj-java8-10</id>
+ <activation>
+ <jdk>[1.8,10]</jdk>
+ </activation>
+ <properties>
+ <aspectj.version>${aspectj.java8.version}</aspectj.version>
+ </properties>
+ </profile>
<profile>
<id>aspectj-java11-20</id>
<activation>
@@ -2658,14 +2667,23 @@
</properties>
</profile>
<profile>
- <id>aspectj-java21-or-later</id>
+ <id>aspectj-java21-24</id>
<activation>
- <jdk>[21,]</jdk>
+ <jdk>[21,24]</jdk>
</activation>
<properties>
<aspectj.version>${aspectj.java21.version}</aspectj.version>
</properties>
</profile>
+ <profile>
+ <id>aspectj-java25-or-later</id>
+ <activation>
+ <jdk>[25,]</jdk>
+ </activation>
+ <properties>
+ <aspectj.version>${aspectj.java25.version}</aspectj.version>
+ </properties>
+ </profile>
<profile>
<id>java11+</id>
<activation>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]