RFR: 8277965: Enclosing instance optimization affects serialization
Liam Miller-Cushon
cushon at openjdk.java.net
Tue Nov 30 02:08:17 UTC 2021
This change disables the optimization introduced in [JDK-8271623](https://bugs.openjdk.java.net/browse/JDK-8277965) for all serializable classes, to avoid potential serialization compatibility issues.
As discussed in [JDK-8277965](https://bugs.openjdk.java.net/browse/JDK-8277965) the serialization spec notes that serializing inner classes is 'strongly discouraged' and that the 'synthetic fields generated by javac ... to implement inner classes are implementation dependent and may vary between compilers', which may allow the new behaviour.
This change is intended as an expedient way to restore the previous behaviour and provide more time to discuss the compatibility impact of this part of the change.
-------------
Commit messages:
- 8277965: Enclosing instance optimization affects serialization
Changes: https://git.openjdk.java.net/jdk/pull/6604/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6604&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8277965
Stats: 20 lines in 2 files changed: 0 ins; 17 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/6604.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6604/head:pull/6604
PR: https://git.openjdk.java.net/jdk/pull/6604
More information about the compiler-dev
mailing list