# HG changeset patch # User asaha # Date 1401747490 25200 # Node ID d6fcbd1e1075768b496482a436bc91d55136bf17 # Parent f73af4455d7d127f7a513f5e99c6a95acf7db2d6# Parent e6b7384074325d5a4ede728d6928ecb7f1cc1326 Merge diff -r f73af4455d7d -r d6fcbd1e1075 make/hotspot_version diff -r f73af4455d7d -r d6fcbd1e1075 src/share/vm/classfile/verifier.cpp --- a/src/share/vm/classfile/verifier.cpp Thu May 29 09:56:06 2014 -0700 +++ b/src/share/vm/classfile/verifier.cpp Mon Jun 02 15:18:10 2014 -0700 @@ -2310,21 +2310,19 @@ Method* m = InstanceKlass::cast(ref_klass)->uncached_lookup_method( vmSymbols::object_initializer_name(), cp->signature_ref_at(bcs->get_index_u2()), Klass::normal); - if (m == NULL) { - verify_error(ErrorContext::bad_code(bci), - "Call to missing method"); - return; - } - instanceKlassHandle mh(THREAD, m->method_holder()); - if (m->is_protected() && !mh->is_same_class_package(_klass())) { - bool assignable = current_type().is_assignable_from( - objectref_type, this, CHECK_VERIFY(this)); - if (!assignable) { - verify_error(ErrorContext::bad_type(bci, - TypeOrigin::cp(new_class_index, objectref_type), - TypeOrigin::implicit(current_type())), - "Bad access to protected method"); - return; + // Do nothing if method is not found. Let resolution detect the error. + if (m != NULL) { + instanceKlassHandle mh(THREAD, m->method_holder()); + if (m->is_protected() && !mh->is_same_class_package(_klass())) { + bool assignable = current_type().is_assignable_from( + objectref_type, this, CHECK_VERIFY(this)); + if (!assignable) { + verify_error(ErrorContext::bad_type(bci, + TypeOrigin::cp(new_class_index, objectref_type), + TypeOrigin::implicit(current_type())), + "Bad access to protected method"); + return; + } } } }