< prev index next >
src/hotspot/share/interpreter/linkResolver.cpp
Print this page
*** 816,828 ****
}
st->cr();
#endif // PRODUCT
}
- // FIXME: update to correct version
- #define VIRTUAL_PRIVATE_ACCESS_VERSION 53
-
// Do linktime resolution of a method in the interface within the context of the specied bytecode.
methodHandle LinkResolver::resolve_interface_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS) {
Klass* resolved_klass = link_info.resolved_klass();
--- 816,825 ----
*** 883,907 ****
Method::name_and_sig_as_C_string(resolved_klass,
resolved_method->name(), resolved_method->signature()));
THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
}
- if (code == Bytecodes::_invokeinterface && resolved_method->is_private()) {
- Klass* current_klass = link_info.current_klass();
- assert(current_klass != NULL, "current_klass should not be null for invokeinterface");
- if (InstanceKlass::cast(current_klass)->major_version() < VIRTUAL_PRIVATE_ACCESS_VERSION) {
- ResourceMark rm(THREAD);
- char buf[200];
- jio_snprintf(buf, sizeof(buf), "private interface method requires invokespecial, not invokeinterface: method %s, caller-class:%s",
- Method::name_and_sig_as_C_string(resolved_klass,
- resolved_method->name(),
- resolved_method->signature()),
- current_klass->internal_name());
- THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
- }
- }
-
if (log_develop_is_enabled(Trace, itables)) {
char buf[200];
jio_snprintf(buf, sizeof(buf), "%s resolved interface method: caller-class:",
Bytecodes::name(code));
trace_method_resolution(buf, link_info.current_klass(), resolved_klass,
--- 880,889 ----
< prev index next >