JDK-8234466 regress startup and footprint of very small applications noticeably.
Cause appears to be the addition of a lambda to JarFile.<clinit>. Since the value is only read rarely and only in one place, it could be simplified to use the default ThreadLocal initial value (null):
- static final ThreadLocal<Boolean> isInitializing =
- ThreadLocal.withInitial(() -> Boolean.FALSE);
+ static final ThreadLocal<Boolean> isInitializing = new ThreadLocal<>();
.. with adjustments in the places that read. This recuperates the startup regression.