4 ms·
This is rather old[0] but still relevant. Surprise #2! A popular open-source framework writes to final fields after object construction via generated bytecode
by xxs 2y ago
This is rather old[0] but still relevant.
Surprise #2! A popular open-source framework writes to final fields after object construction via generated bytecodes!... This optimization of the final field is *the* main optimization performed on final fields.
[0] https://web.archive.org/web/20121016082428/http://www.azulsystems.com/blog/cliff/2011-10-17-writing-to-final-fields-via-reflection https://web.archive.org/web/20121016082428/http://www.azulsy...