Fixed
Details
Assignee
Andrej GolovninAndrej GolovninReporter
Andrej GolovninAndrej GolovninParticipants
Andrej GolovninEmmanuel BernardFix versions
Priority
Major
Details
Details
Assignee
Andrej Golovnin
Andrej GolovninReporter
Andrej Golovnin
Andrej GolovninParticipants
Andrej Golovnin
Emmanuel Bernard
Fix versions
Priority
Created December 16, 2015 at 8:18 PM
Updated March 14, 2024 at 9:48 PM
Resolved February 13, 2018 at 12:19 PM
Current implementation of the Reflection API does not use the same caching as used for auto-boxing. This has been fixed in JDK 9 (see https://bugs.openjdk.java.net/browse/JDK-5043030 for details) but not in JDK 8 or 7. Therefore, when JavaXProperty reads for example a primitive field of the type "boolean", it creates every time a new object of type "Boolean". We can workaround this problem by using getter-methods of the Field class, which return primitive values, and wrapping the result using the valueOf-methods of the wrapper classes.