Mon, 02 Jun 2014 15:18:10 -0700
Merge
make/hotspot_version | file | annotate | diff | comparison | revisions | |
src/share/vm/classfile/verifier.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/classfile/verifier.cpp Thu May 29 09:56:06 2014 -0700 1.2 +++ b/src/share/vm/classfile/verifier.cpp Mon Jun 02 15:18:10 2014 -0700 1.3 @@ -2310,21 +2310,19 @@ 1.4 Method* m = InstanceKlass::cast(ref_klass)->uncached_lookup_method( 1.5 vmSymbols::object_initializer_name(), 1.6 cp->signature_ref_at(bcs->get_index_u2()), Klass::normal); 1.7 - if (m == NULL) { 1.8 - verify_error(ErrorContext::bad_code(bci), 1.9 - "Call to missing <init> method"); 1.10 - return; 1.11 - } 1.12 - instanceKlassHandle mh(THREAD, m->method_holder()); 1.13 - if (m->is_protected() && !mh->is_same_class_package(_klass())) { 1.14 - bool assignable = current_type().is_assignable_from( 1.15 - objectref_type, this, CHECK_VERIFY(this)); 1.16 - if (!assignable) { 1.17 - verify_error(ErrorContext::bad_type(bci, 1.18 - TypeOrigin::cp(new_class_index, objectref_type), 1.19 - TypeOrigin::implicit(current_type())), 1.20 - "Bad access to protected <init> method"); 1.21 - return; 1.22 + // Do nothing if method is not found. Let resolution detect the error. 1.23 + if (m != NULL) { 1.24 + instanceKlassHandle mh(THREAD, m->method_holder()); 1.25 + if (m->is_protected() && !mh->is_same_class_package(_klass())) { 1.26 + bool assignable = current_type().is_assignable_from( 1.27 + objectref_type, this, CHECK_VERIFY(this)); 1.28 + if (!assignable) { 1.29 + verify_error(ErrorContext::bad_type(bci, 1.30 + TypeOrigin::cp(new_class_index, objectref_type), 1.31 + TypeOrigin::implicit(current_type())), 1.32 + "Bad access to protected <init> method"); 1.33 + return; 1.34 + } 1.35 } 1.36 } 1.37 }