Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented Nov 16, 2025

Set --sun-misc-unsafe-memory-access=warn (JEP 498)

  • JDK 26 will change the default from warn it to deny and throw on Unsafe mem access method usage, this sets it back
  • gives us more time to update the dependencies (till JDK 27)

note: as of 26b23, this isn't implemented yet

set -J-Dguice_custom_class_loading=CHILD

meta issue #8259

@mbien mbien added this to the NB29 milestone Nov 16, 2025
@mbien mbien added Platform [ci] enable platform tests (platform/*) Upgrade JDK Upgrade to the JDK requirements of a module. labels Nov 16, 2025
@mbien mbien marked this pull request as draft November 16, 2025 19:24
@mbien mbien changed the title Set --sun-misc-unsafe-memory-access=allow (JEP 498) Set --sun-misc-unsafe-memory-access=warn (JEP 498) Nov 16, 2025
@mbien mbien added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Nov 16, 2025
@mbien mbien marked this pull request as ready for review November 16, 2025 19:52
@mbien mbien added the Maven [ci] enable "build tools" tests label Nov 16, 2025
@mbien
Copy link
Member Author

mbien commented Nov 18, 2025

wondering if we should set it in
https://github.com/apache/netbeans/blob/master/nbbuild/jms-config/base.flags instead,

or append to

<property name="test.run.args" value="-ea -Xms1200m -Xmx1200m -XX:+UseParallelGC ${metabuild.jms-flags.jvm} ${test.jms.flags} -XX:+IgnoreUnrecognizedVMOptions"/>
.

Since that way tests would pick it up too. They might start failing at some point.

 - JDK 26 will set it to deny and throw on Unsafe mem access method
   usage
 - gives us more time to update the dependencies (till JDK 27)

Set -J-Dguice_custom_class_loading=CHILD

 - this will lead guice to code paths which don't use Unsafe for class
   definition
   (e.g it won't use com.google.inject.internal.aop.HiddenClassDefiner)
 - maven 4 uses the same trick (maven/pull/11002)
@ebarboni
Copy link
Contributor

I have no idea what too choose. JDK 26 will "freeze" change begining december ?

@mbien
Copy link
Member Author

mbien commented Nov 18, 2025

I have no idea what too choose. JDK 26 will "freeze" change begining december ?

not sure. JEP states "deny will be the default value in phase 3 (JDK 26 or later)", maybe it won't even be changed in JDK 26 - I don't know.

@mbien
Copy link
Member Author

mbien commented Nov 18, 2025

we could keep it as is and only add it to the .conf. When the tests start failing we add it either globally or only for those modules which failed at that time.

@ebarboni
Copy link
Contributor

I it's helps go for the more convenient

@mbien mbien removed the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Nov 19, 2025
@mbien mbien merged commit b5d2a9b into apache:master Nov 19, 2025
65 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maven [ci] enable "build tools" tests Platform [ci] enable platform tests (platform/*) Upgrade JDK Upgrade to the JDK requirements of a module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants