Use String.intern() for Class reading [SPR-14886] #19452
Another place where String.intern() can be used as described in issue #19428
This is the most inner class i could find that create the String. So the return of this method can use ....intern()
This method is used internally inside the class for super / interface and other classnames.
This visitor is returned as an implementation for the Interface "AnnotationMetadata" inside "SimpleMetadataReader" which is the only implementation for an metadata reader in the "ScannedGenericBeanDefinition" definition which will be hold inside memory.
Complicated enough, if you read backwards the ScannedGenericBeanDefinition stores the metadata as a field. This is the Visitor described above, which uses the ASM ClassReader to generate the Strings. The Strings are stored multiple times in Memory, this can be avoided to intern the String inside this chain of classes - most inner one is ClassReader (see source above).
The text was updated successfully, but these errors were encountered: