You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "sbernardo (via GitHub)" <gi...@apache.org> on 2026/07/20 09:57:59 UTC

Re: [I] Breaking change: fory-core 1.3.0 requires --add-opens=java.base/java.lang.invoke=ALL-UNNAMED on JDK 25 [fory]

sbernardo commented on issue #3788:
URL: https://github.com/apache/fory/issues/3788#issuecomment-5020978122

   This appears to be resolved in 1.4.0.
   
   I verified it empirically on JDK 25 (Temurin 25.0.2), same classpath and same test harness, only swapping the fory-core version:
   - 1.3.0, no JVM flags → fails on first use during static init:
     java.lang.ExceptionInInitializerError
     Caused by: java.lang.IllegalStateException: JDK25+ string internals are inaccessible.
     JDK25 zero-Unsafe mode requires java.base/java.lang.invoke to be open to Fory.
     Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field
     static final java.lang.invoke.MethodHandles$Lookup ...IMPL_LOOKUP accessible:
     module java.base does not "opens java.lang.invoke" to unnamed module
   - 1.4.0, no --add-opens → initializes cleanly and runs with JIT codegen enabled (withCodegen(true)), full serialize/deserialize/copy round-trips succeed, no fory-jit-compiler background exceptions.
   
   So on 1.4.0 the `--add-opens=java.base/java.lang.invoke=ALL-UNNAMED` workaround is no longer required. We were able to drop it entirely (manifest Add-Opens entry + surefire argLine) after upgrading.
   
   Was this fixed intentionally in 1.4.0?


-- 
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: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org