This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git


The following commit(s) were added to refs/heads/main by this push:
     new e9304f606 feat(java): support jdk 25 (#2954)
e9304f606 is described below

commit e9304f6063a3ffa0c88790d04978565875ac94ea
Author: Shawn Yang <[email protected]>
AuthorDate: Mon Dec 1 11:04:39 2025 +0800

    feat(java): support jdk 25 (#2954)
    
    <!--
    **Thanks for contributing to Apache Fory™.**
    
    **If this is your first time opening a PR on fory, you can refer to
    
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
    
    Contribution Checklist
    
    - The **Apache Fory™** community has requirements on the naming of pr
    titles. You can also find instructions in
    [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
    
    - Apache Fory™ has a strong focus on performance. If the PR you submit
    will have an impact on performance, please benchmark it first and
    provide the benchmark result here.
    -->
    
    ## Why?
    
    <!-- Describe the purpose of this PR. -->
    
    ## What does this PR do?
    
    <!-- Describe the details of this PR. -->
    
    ## Related issues
    
    <!--
    Is there any related issue? If this PR closes them you say say
    fix/closes:
    
    - #xxxx0
    - #xxxx1
    - Fixes #xxxx2
    -->
    
    ## Does this PR introduce any user-facing change?
    
    <!--
    If any user-facing interface changes, please [open an
    issue](https://github.com/apache/fory/issues/new/choose) describing the
    need to do so and update the document if necessary.
    
    Delete section if not applicable.
    -->
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    
    <!--
    When the PR has an impact on performance (if you don't know whether the
    PR will have an impact on performance, you can submit the PR first, and
    if it will have impact on performance, the code reviewer will explain
    it), be sure to attach a benchmark data here.
    
    Delete section if not applicable.
    -->
---
 .github/workflows/ci.yml                                  |  2 +-
 ci/run_ci.py                                              |  2 +-
 ci/run_ci.sh                                              |  2 +-
 ci/tasks/java.py                                          |  5 +++--
 .../java/org/apache/fory/reflect/ReflectionUtils.java     | 15 +++++++++++----
 5 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 87a2c8558..a878219c2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -46,7 +46,7 @@ jobs:
       MY_VAR: "PATH"
     strategy:
       matrix:
-        java-version: ["8", "11", "17", "21", "24"]
+        java-version: ["8", "11", "17", "21", "25"]
     steps:
       - uses: actions/checkout@v5
       - name: Set up JDK ${{ matrix.java-version }}
diff --git a/ci/run_ci.py b/ci/run_ci.py
index 7818a9e60..38e426a4d 100644
--- a/ci/run_ci.py
+++ b/ci/run_ci.py
@@ -159,7 +159,7 @@ def parse_args():
             "11",
             "17",
             "21",
-            "24",
+            "25",
             "windows_java21",
             "integration_tests",
             "graalvm",
diff --git a/ci/run_ci.sh b/ci/run_ci.sh
index 21d76e121..7fd178db6 100755
--- a/ci/run_ci.sh
+++ b/ci/run_ci.sh
@@ -281,7 +281,7 @@ case $1 in
     java21)
       jdk17_plus_tests
     ;;
-    java24)
+    java25)
       jdk17_plus_tests
     ;;
     kotlin)
diff --git a/ci/tasks/java.py b/ci/tasks/java.py
index 68d6022ee..006db255c 100644
--- a/ci/tasks/java.py
+++ b/ci/tasks/java.py
@@ -55,6 +55,7 @@ JDKS = {
     "17": "zulu17.44.17-ca-crac-jdk17.0.8-linux_x64",
     "21": "zulu21.28.85-ca-jdk21.0.0-linux_x64",
     "24": "zulu24.32.13-ca-fx-jdk24.0.2-linux_x64",
+    "25": "zulu25.30.17-ca-jdk25.0.1-linux_x64",
 }
 
 
@@ -323,8 +324,8 @@ def run(version=None, release=False, install_jdks=False, 
install_fory=False):
         run_jdk17_plus("17")
     elif version == "21":
         run_jdk17_plus("21")
-    elif version == "24":
-        run_jdk17_plus("24")
+    elif version == "25":
+        run_jdk17_plus("25")
     elif version == "windows_java21":
         run_windows_java21()
     elif version == "integration_tests":
diff --git 
a/java/fory-core/src/main/java/org/apache/fory/reflect/ReflectionUtils.java 
b/java/fory-core/src/main/java/org/apache/fory/reflect/ReflectionUtils.java
index 156a7f0ac..e55b9a069 100644
--- a/java/fory-core/src/main/java/org/apache/fory/reflect/ReflectionUtils.java
+++ b/java/fory-core/src/main/java/org/apache/fory/reflect/ReflectionUtils.java
@@ -246,7 +246,12 @@ public class ReflectionUtils {
       String msg = String.format("class %s doesn't have method %s", cls, 
methodName);
       throw new IllegalArgumentException(msg);
     }
-    return methods.get(0).getExceptionTypes().length > 0;
+    for (Method method : methods) {
+      if (method.getExceptionTypes().length > 0) {
+        return true;
+      }
+    }
+    return false;
   }
 
   /** Returns true if any method named {@code methodName} has checked 
exception. */
@@ -256,9 +261,11 @@ public class ReflectionUtils {
       String msg = String.format("class %s doesn't have method %s", cls, 
methodName);
       throw new IllegalArgumentException(msg);
     }
-    for (Class<?> exceptionType : methods.get(0).getExceptionTypes()) {
-      if (!RuntimeException.class.isAssignableFrom(exceptionType)) {
-        return true;
+    for (Method method : methods) {
+      for (Class<?> exceptionType : method.getExceptionTypes()) {
+        if (!RuntimeException.class.isAssignableFrom(exceptionType)) {
+          return true;
+        }
       }
     }
     return false;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to