< prev index next >

test/compiler/jvmci/compilerToVM/ResolveMethodTest.java

Print this page

        

@@ -135,12 +135,18 @@
                 .lookupType(Utils.toJVMTypeSignature(tcase.holder),
                         getClass(), /* resolve = */ true);
         HotSpotResolvedObjectType callerMetaspace = CompilerToVMHelper
                 .lookupType(Utils.toJVMTypeSignature(tcase.caller),
                         getClass(), /* resolve = */ true);
+        HotSpotResolvedObjectType receiverMetaspace = CompilerToVMHelper
+                .lookupType(Utils.toJVMTypeSignature(tcase.receiver),
+                        getClass(), /* resolve = */ true);
+
+        // Can only resolve methods on a linked class so force initialization
+        receiverMetaspace.initialize();
         HotSpotResolvedJavaMethod resolvedMetaspaceMethod
-                = CompilerToVMHelper.resolveMethod(holderMetaspace,
+                = CompilerToVMHelper.resolveMethod(receiverMetaspace,
                         metaspaceMethod, callerMetaspace);
         if (tcase.isPositive) {
             Asserts.assertNotNull(resolvedMetaspaceMethod,
                     "Unexpected null resolved method value for "
                             + tcase.methodName);
< prev index next >