src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Jan 15 19:25:15 2014
--- new/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Jan 15 19:25:15 2014

*** 636,645 **** --- 636,651 ---- // in order to pass the verifier, we need to convert this to invokevirtual in all cases assert(member.canBeStaticallyBound()) : member; refKind = REF_invokeVirtual; } + if (member.getDeclaringClass().isInterface() && refKind == REF_invokeVirtual) { + // Methods from Object declared in an interface can be resolved by JVM to invokevirtual kind. + // Need to convert it back to invokeinterface to pass verification and make the invocation works as expected. + refKind = REF_invokeInterface; + } + // push arguments for (int i = 0; i < name.arguments.length; i++) { emitPushArgument(name, i); }

src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File