comparison src/share/vm/oops/klassVtable.cpp @ 13403:9d15b81d5d1b

8016839: JSR292: AME instead of IAE when calling a method Summary: Catch missing-because-illegal case for itable entries and use an exception-throwing method instead of null. Reviewed-by: acorn, jrose, coleenp
author drchase
date Tue, 26 Nov 2013 18:16:04 -0500
parents fce21ac5968d
children 379f11bc04fc
comparison
equal deleted inserted replaced
13397:e51d73189692 13403:9d15b81d5d1b
1074 methodHandle target; 1074 methodHandle target;
1075 if (m->has_itable_index()) { 1075 if (m->has_itable_index()) {
1076 LinkResolver::lookup_instance_method_in_klasses(target, _klass, m->name(), m->signature(), CHECK); 1076 LinkResolver::lookup_instance_method_in_klasses(target, _klass, m->name(), m->signature(), CHECK);
1077 } 1077 }
1078 if (target == NULL || !target->is_public() || target->is_abstract()) { 1078 if (target == NULL || !target->is_public() || target->is_abstract()) {
1079 // Entry do not resolve. Leave it empty 1079 // Entry does not resolve. Leave it empty for AbstractMethodError.
1080 if (!(target == NULL) && !target->is_public()) {
1081 // Stuff an IllegalAccessError throwing method in there instead.
1082 itableOffsetEntry::method_entry(_klass(), method_table_offset)[m->itable_index()].
1083 initialize(Universe::throw_illegal_access_error());
1084 }
1080 } else { 1085 } else {
1081 // Entry did resolve, check loader constraints before initializing 1086 // Entry did resolve, check loader constraints before initializing
1082 // if checkconstraints requested 1087 // if checkconstraints requested
1083 if (checkconstraints) { 1088 if (checkconstraints) {
1084 Handle method_holder_loader (THREAD, target->method_holder()->class_loader()); 1089 Handle method_holder_loader (THREAD, target->method_holder()->class_loader());