RFR: 8277965: Enclosing instance optimization affects serialization
Joe Darcy
darcy at openjdk.java.net
Wed Dec 1 20:50:27 UTC 2021
On Tue, 30 Nov 2021 01:59:55 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
> 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.
Marked as reviewed by darcy (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/6604
More information about the compiler-dev
mailing list