JDK 21 | JDK 22 |
---|---|
21.0.2Fixed | 22 b02Fixed |
Relates :
|
A DESCRIPTION OF THE PROBLEM : The @jdk.internal.vm.annotation.Stable annotation indicates to the HotSpot vm that it can trust the contents of an array to be treated as constant. I think that primitive wrapper caches (such as Integer.IntegerCache.cache) could benefit from such optimization. Please correct me if I'm wrong, I'd love to know if there's other, more powerful optimizations in place, or other reasons why this wouldn't be a good idea or could cause issues.
|