941 // check if invokespecial's interface method reference is in an indirect superinterface |
941 // check if invokespecial's interface method reference is in an indirect superinterface |
942 if (!current_klass.is_null() && resolved_klass->is_interface()) { |
942 if (!current_klass.is_null() && resolved_klass->is_interface()) { |
943 Klass *klass_to_check = !InstanceKlass::cast(current_klass())->is_anonymous() ? |
943 Klass *klass_to_check = !InstanceKlass::cast(current_klass())->is_anonymous() ? |
944 current_klass() : |
944 current_klass() : |
945 InstanceKlass::cast(current_klass())->host_klass(); |
945 InstanceKlass::cast(current_klass())->host_klass(); |
946 |
946 // As of the fix for 4486457 we disable verification for all of the |
947 if (!InstanceKlass::cast(klass_to_check)->is_same_or_direct_interface(resolved_klass())) { |
947 // dynamically-generated bytecodes associated with the 1.4 |
|
948 // reflection implementation, not just those associated with |
|
949 // sun/reflect/SerializationConstructorAccessor. |
|
950 bool is_reflect = JDK_Version::is_gte_jdk14x_version() && |
|
951 UseNewReflection && |
|
952 klass_to_check->is_subclass_of( |
|
953 SystemDictionary::reflect_MagicAccessorImpl_klass()); |
|
954 |
|
955 if (!is_reflect && |
|
956 !InstanceKlass::cast(klass_to_check)->is_same_or_direct_interface(resolved_klass())) { |
948 ResourceMark rm(THREAD); |
957 ResourceMark rm(THREAD); |
949 char buf[200]; |
958 char buf[200]; |
950 jio_snprintf(buf, sizeof(buf), |
959 jio_snprintf(buf, sizeof(buf), |
951 "Interface method reference: %s, is in an indirect superinterface of %s", |
960 "Interface method reference: %s, is in an indirect superinterface of %s", |
952 Method::name_and_sig_as_C_string(resolved_klass(), |
961 Method::name_and_sig_as_C_string(resolved_klass(), |