src/share/vm/runtime/reflection.cpp

Print this page

        

@@ -468,16 +468,10 @@
       && UseNewReflection
       && current_class->is_subclass_of(SystemDictionary::reflect_MagicAccessorImpl_klass())) {
     return true;
   }
 
-  // Also allow all accesses from
-  // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
-  if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
-    return true;
-  }
-
   return can_relax_access_check_for(current_class, new_class, classloader_only);
 }
 
 static bool under_host_klass(InstanceKlass* ik, Klass* host_klass) {
   DEBUG_ONLY(int inf_loop_check = 1000 * 1000 * 1000);

@@ -568,16 +562,10 @@
       && UseNewReflection
       && current_class->is_subclass_of(SystemDictionary::reflect_MagicAccessorImpl_klass())) {
     return true;
   }
 
-  // Also allow all accesses from
-  // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
-  if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
-    return true;
-  }
-
   return can_relax_access_check_for(
     current_class, field_class, classloader_only);
 }