hotspot/src/share/vm/ci/ciField.cpp
changeset 31519 bb26c50aadd0
parent 31019 d05fcdd70109
child 33483 5b7dd5bd7c5c
equal deleted inserted replaced
31518:2c9bfffb1b71 31519:bb26c50aadd0
   184     // Never trust strangely unstable finals:  System.out, etc.
   184     // Never trust strangely unstable finals:  System.out, etc.
   185     return false;
   185     return false;
   186   // Even if general trusting is disabled, trust system-built closures in these packages.
   186   // Even if general trusting is disabled, trust system-built closures in these packages.
   187   if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke"))
   187   if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke"))
   188     return true;
   188     return true;
       
   189   // Trust VM anonymous classes. They are private API (sun.misc.Unsafe) and can't be serialized,
       
   190   // so there is no hacking of finals going on with them.
       
   191   if (holder->is_anonymous())
       
   192     return true;
   189   return TrustFinalNonStaticFields;
   193   return TrustFinalNonStaticFields;
   190 }
   194 }
   191 
   195 
   192 void ciField::initialize_from(fieldDescriptor* fd) {
   196 void ciField::initialize_from(fieldDescriptor* fd) {
   193   // Get the flags, offset, and canonical holder of the field.
   197   // Get the flags, offset, and canonical holder of the field.