redoom opened a new pull request, #15754: URL: https://github.com/apache/dubbo/pull/15754
JDK 25 ServiceLoader Behavior: In JDK 25, ServiceLoader.hasNext() now eagerly validates class dependencies. This caused NoClassDefFoundError when checking for extensions with missing optional dependencies (e.g., FastJSON), breaking the extension loading mechanism. JDK 21 SequencedCollection Issue: The introduction of SequencedCollection in JDK 21 caused type inference problems for Jackson when deserializing List.class. Build Tool Compatibility: The Spotless Maven Plugin was incompatible with JDK 25, causing build failures. Changes Made Core Compatibility Fixes JsonUtils.java: Wrapped ServiceLoader.hasNext() in a try-catch block to gracefully handle JDK 25's new eager validation when optional JSON libraries are missing. JacksonImpl.java: Changed List.class to the concrete ArrayList.class to resolve the SequencedCollection type ambiguity for Jackson on JDK 21+. JRE.java: Added detection logic for JDK 24 and 25. Build Configuration (pom.xml) Upgraded Spotless Maven Plugin to 2.45.0. Added a new jdk25-spotless profile to use a compatible formatter version for JDK 25. CI/CD Integration Added JDK 25 to all GitHub Actions test matrices (build-and-test-pr, build-and-test-scheduled-3.3, release-test). All test jobs now run against: [8, 11, 17, 21, 25]. Compatibility ✅ JDK 8-17: No behavioral changes, fully backward compatible. ✅ JDK 21-24: Fixes SequencedCollection compatibility issues. ✅ JDK 25: Full support with ServiceLoader and build tool fixes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
