Java Cup
Inside Java

News and views from members of the Java team at Oracle

Java 26 Warns of Deep Reflection - Inside Java Newscast #101

Java 26 will issue run-time warnings when a final field is mutated through reflection. This prepares for a future change that will make such final field mutations illegal by default to improve Java's integrity, in particular the guarantees provided by the keyword final. This will have beneficial effects on maintainability, security, and performance. While the recommendation is to move away from final field mutation, the new permanent command-line option --enable-final-field-mutation allows it for selected modules. To ease migration, the more general but temporary option --illegal-final-field-mutation was also introduced.

Show Notes

Additional Resources

The Inside Java Newscast is a monthly YouTube show - check out the YouTube playlist for all the episodes. Since 2026, we also publish it as a podcast. For more Java news, subscribe to our RSS feed and follow @Java on X.

Contact us.