hotspot/src/share/vm/runtime/reflection.cpp
changeset 27022 2db6fe33afc2
parent 26412 80741eb33ba2
child 27677 b1997f2f1b56
child 27613 f4773c0d8717
--- a/hotspot/src/share/vm/runtime/reflection.cpp	Tue Oct 14 13:10:50 2014 -0700
+++ b/hotspot/src/share/vm/runtime/reflection.cpp	Tue Jul 22 16:16:51 2014 +0400
@@ -507,7 +507,8 @@
   if (access.is_protected()) {
     if (!protected_restriction) {
       // See if current_class (or outermost host class) is a subclass of field_class
-      if (host_class->is_subclass_of(field_class)) {
+      // An interface may not access protected members of j.l.Object
+      if (!host_class->is_interface() && host_class->is_subclass_of(field_class)) {
         if (access.is_static() || // static fields are ok, see 6622385
             current_class == resolved_class ||
             field_class == resolved_class ||