Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
9 lines
471 B
Plaintext
9 lines
471 B
Plaintext
# 01-value-classes: ValueClasses.java on JDK 28 with --enable-preview
|
|
p == q: true, equals: true
|
|
isValue: true
|
|
synchronized on a value object: java.lang.IdentityException: Cannot synchronize on an instance of value class ValueClasses$Point
|
|
--- IntegerIdentity.java: same source, three runs
|
|
JDK 25: Integer 1000 == Integer 1000: false
|
|
JDK 28, no preview: Integer 1000 == Integer 1000: false
|
|
JDK 28, --enable-preview: Integer 1000 == Integer 1000: true
|