Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
12 lines
819 B
Plaintext
12 lines
819 B
Plaintext
# Reflection writing to a final field on JDK 27: same behaviour as 26 (compare 70-final-field-mutation.txt)
|
|
|
|
=== JDK 27, defaults
|
|
WARNING: Final field port in class FinalFieldMutation$Config has been mutated reflectively by class FinalFieldMutation in unnamed module @<hash> (file:<repo>/build/lanes/ffm27/)
|
|
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
|
|
field reads : 9090
|
|
port() returns : 8080
|
|
|
|
=== JDK 27, --illegal-final-field-mutation=deny
|
|
setInt refused : class FinalFieldMutation (in unnamed module @<hash>) cannot set final field FinalFieldMutation$Config.port (in unnamed module @<hash>), unnamed module @<hash> is not allowed to mutate final fields
|