[PATCH] Use #valueOf()-methods in Unsafe-based FieldAccessors

Andrej Golovnin golovnin at gmx.net
Tue May 1 19:33:52 UTC 2012


Hi all,

Is there some reason for not using #valueOf-methods from wrapper classes
in Unsafe-based FieldAccessors in sun.reflect-package (see the attached patch)?

The main motivation for this patch is to reduce memory consumption in applications
which make heavy use of reflection API (e.g. apps which use ORM solutions).

The patch does not modify Unsafe-based FieldAccessors for double and float
fields as the wrapper classes does not provide caching for fields of this types.

Best regards
Andrej Golovnin



More information about the core-libs-dev mailing list