Get the latest tech news
JEP draft: Prepare to make final mean final
draft: Prepare to Make Final Mean Final Summary Issue warnings about uses of deep reflection to mutate final fields. The warnings aim to prepare developers for a future release that ensures integrity by default by restricting final field mutation; this makes Java programs safer and potentially faster.
The warnings aim to prepare developers for a future release that ensures integrity by default by restricting final field mutation; this makes Java programs safer and potentially faster. The Java Platform provides a number of APIs that allow final fields to be reassigned at any time by any code in the program, undermining all reasoning about correctness and invalidating important optimizations. Rather than issue warnings, a future JDK release will throw exceptions by default when Java code uses deep reflection to mutate final fields.
Or read this on Hacker News