| ▲ | debugnik 6 hours ago | |
That's a separate series of JEPs known as "final means final", also starting to land nowadays. | ||
| ▲ | cogman10 6 hours ago | parent [-] | |
I believe these 2 are effectively linked. There's a jdk.internal API which will work as an escape hatch, but that does come with the need for non-compliant libraries to switch over to it. That safety hatch also only allows the setting of final fields once before observation (which is generally fine). So if your code is doing something more esoteric that sets a final field multiple times you will be SOL. In any case, if you are using the sun.misc.Unsafe methods for setting final and private fields you'll need to update. | ||