JDK-8080591 : VarHandles for static fields
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-05-18
  • Updated: 2016-02-09
  • Resolved: 2016-02-09
Description
Support VarHandles for variables that are static fields. 

All primitive types should be supported for relaxed and volatile access. 

Reference, int and long types support enhanced fenced and atomic operations. Int and long types support additional numeric atomic operations. 

Fields marked final are read only. 

Access control is governed by the same rules as that for MethodHandles.Lookup.findStaticGetter/Setter.

Static initialization of the defining class should be performed lazily and only once if possible (subsequent accesses should elide the check and initialization)