Hello Chandan, I just ran the command shared by you and also tried producing these warnings with other gradle commands. And I am not getting any such warnings. Please refer below files:
https://drive.google.com/drive/folders/1HG6Sdb_C_CSAx_Gz_8TDsYueevtvL-Jg And I am also not seeing any such warning in a console log that has been shared in my previous mail. https://issues.apache.org/jira/secure/attachment/13083277/console-output-java21.txt Can you please share the output of the following commands: ashish@Ashish-Vijaywargiya ofbiz-trunk % java -version openjdk version "21.0.11" 2026-04-21 LTS OpenJDK Runtime Environment Temurin-21.0.11+10 (build 21.0.11+10-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.11+10 (build 21.0.11+10-LTS, mixed mode, sharing) ashish@Ashish-Vijaywargiya ofbiz-trunk % javac -version javac 21.0.11 ashish@Ashish-Vijaywargiya ofbiz-trunk % ashish@Ashish-Vijaywargiya ofbiz-trunk % ./gradlew --version ------------------------------------------------------------ Gradle 8.14.5 ------------------------------------------------------------ Build time: 2026-05-07 11:03:29 UTC Revision: 62345becae08b13e793521816d585102fea66398 Kotlin: 2.0.21 Groovy: 3.0.25 Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024 Launcher JVM: 21.0.11 (Eclipse Adoptium 21.0.11+10-LTS) Daemon JVM: /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home (no JDK specified, using current Java home) OS: Mac OS X 26.5.2 aarch64 Thank you! -- Thanks & Regards, Ashish Vijaywargiya https://www.linkedin.com/in/ashishvijaywargiya/ On Fri, 17 Jul 2026 at 14:17, Ashish Vijaywargiya <[email protected]> wrote: > Thank you, Chandan. > > I am on it and will revert back shortly. > > Thanks, > Ashish > Sent from my iPhone > > On Fri, 17 Jul 2026 at 12:24 PM, Chandan Khandelwal < > [email protected]> wrote: > >> Hello Ashsih, >> >> Thanks for sharing the details. >> >> I tested the changes with both JDK 17 and JDK 21 using ./gradlew clean >> test, >> and the build/tests completed successfully on both versions. >> >> One observation during the JDK 21 build: I noticed compiler warnings >> similar to the below: >> >> > Task :compileJava >> UtilCache.java:1: warning: [dangling-doc-comments] documentation >> comment is not attached to any declaration >> ExecutionPool.java:1: warning: [dangling-doc-comments] documentation >> comment is not attached to any declaration >> ..... >> >> It looks like the JDK 21 compiler is interpreting the license headers >> starting with /**************** as dangling Javadoc comments due to the >> /** >> sequence at the beginning. Could you please confirm if this is expected >> behavior with JDK 21, or if any cleanup is required? >> >> Overall, the approach of keeping Java 17 as the target version while >> validating Java 21 compatibility looks good. Please let me know if I am >> missing anything. >> >> >> Kind Regards, >> Chandan Khandelwal >> >> >> >> On Thu, Jul 16, 2026 at 3:49 PM Ashish Vijaywargiya <[email protected]> >> wrote: >> >> > Hello All, >> > >> > I recently worked on a Jira issue (Upgrade java version to 21): >> > https://issues.apache.org/jira/browse/OFBIZ-13306 >> > >> > First of all, I provided support for Java 21 in the OFBiz trunk code. >> And >> > then after reading the comment on Jira, I concluded to provide support >> for >> > both Java17 and Java21 in the ofbiz trunk. >> > >> > More details below: >> > >> > Since Release24.09 still runs on Java 17, we've rolled trunk's compile >> > target back to Java 17 while keeping it tested on Java 21 too. >> > >> > Summary: >> > >> > 1) build.gradle and gradle.yml now target Java 17 again (bytecode, >> javadoc, >> > CI). Please refer how I have used metrix support in gradle.yml file. >> > >> > 2) CI now runs a JDK matrix (17 and 21) on every push/PR, skipping 21 >> for >> > release* branches. >> > >> > 3) Reverted Java 19+ only calls (Locale.of, Thread.threadId) back to >> their >> > pre-19 equivalents across 16 files, since JDK 17 doesn't have them. >> > >> > 4) Confirmed those older calls are only "deprecated," not "removed," so >> > they're safe on both JDK versions. >> > >> > 5) Cleaned up all resulting compiler warnings with narrowly-scoped >> > @SuppressWarnings("deprecation"). >> > >> > 6) Also caught and reverted two committed secret values in >> > security.properties back to blank. >> > >> > 7) Ran the full unit test suite (423 tests) on both JDK 17 and JDK 21 — >> 0 >> > warnings, 0 failures on both. >> > >> > 8) I have built and run the code on my laptop. Here is the console >> output. >> > >> > >> > >> https://issues.apache.org/jira/secure/attachment/13083276/console-output-java17.txt >> > >> > >> > >> https://issues.apache.org/jira/secure/attachment/13083277/console-output-java21.txt >> > >> > Here is the PR of my work: >> > https://github.com/apache/ofbiz-framework/pull/1460 >> > >> > Now I am all set to start using ofbiz trunk code on Java21 in my laptop >> and >> > others can also do the same. >> > >> > Please let me know if you may require further assistance on this work. >> > >> > Thanks & Regards, >> > Ashish Vijaywargiya >> > https://www.linkedin.com/in/ashishvijaywargiya/ >> > >> >
