On Mar 8, 2015, at 4:32 PM, David Holmes <david.hol...@oracle.com> wrote: > > Yes it could but why should it be? You have a singleton instance with all > instance methods, so cached state should be in an instance field not a static > one.
No, the singleton instance is *not* currently used, so it would add new constraints on the optimizer to begin using fields from it. Only the non-nullness of its reference is significant. It has no state by design. Put another way: It is a uniquely simple empty singleton object. To pass the unsafe access check, the JIT need only check that some non-null reference is available. And JVM JITs are very good at exactly that check. — John