Skip to content

fix: mutated fields cannot be final#2430

Open
wfouche wants to merge 4 commits intojbangdev:mainfrom
wfouche:dev/serialized-final
Open

fix: mutated fields cannot be final#2430
wfouche wants to merge 4 commits intojbangdev:mainfrom
wfouche:dev/serialized-final

Conversation

@wfouche
Copy link
Contributor

@wfouche wfouche commented Mar 23, 2026

Closes #2417

@wfouche
Copy link
Contributor Author

wfouche commented Mar 23, 2026

Before PR, using Java 26 as default JVM

$ jbang run asciidoctorj@asciidoctor -V
WARNING: Final field catalogRef in class dev.jbang.catalog.CatalogRef has been mutated reflectively by class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2 in unnamed module @7bfcd12c (file:/home/wfouche/.sdkman/candidates/jbang/0.137.0/bin/jbang.jar)
WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning
WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled
AsciidoctorJ 3.0.1 (Asciidoctor 2.0.26) [https://asciidoctor.org]
Runtime Environment: jruby 9.4.14.0 (3.1.7)

After PR, using Java 26 as default JVM

$ ./build/install/jbang/bin/jbang run asciidoctorj@asciidoctor -V
AsciidoctorJ 3.0.1 (Asciidoctor 2.0.26) [https://asciidoctor.org]
Runtime Environment: jruby 9.4.14.0 (3.1.7)

@wfouche wfouche marked this pull request as draft March 24, 2026 06:30
@wfouche wfouche marked this pull request as ready for review March 24, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JBang and Java 26 final fields

2 participants