< prev index next >

test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java

Print this page
rev 50604 : imported patch jep181-rev1

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -37,10 +37,11 @@
 import jdk.vm.ci.runtime.JVMCI;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertNotNull;
 
 public class ResolvedJavaTypeResolveConcreteMethodTest {
     public final MetaAccessProvider metaAccess;
 
     public ResolvedJavaTypeResolveConcreteMethodTest() {

@@ -115,12 +116,13 @@
         ResolvedJavaType a = getType(A.class);
         ResolvedJavaType b = getType(B.class);
         ResolvedJavaType c = getType(C.class);
         ResolvedJavaMethod priv = getMethod(a, "priv");
 
-        assertNull(a.resolveConcreteMethod(priv, c));
-        assertNull(b.resolveConcreteMethod(priv, c));
+        // nestmates have access to private methods
+        assertNotNull(a.resolveConcreteMethod(priv, c));
+        assertNotNull(b.resolveConcreteMethod(priv, c));
     }
 
     @Test
     public void testAbstractMethod() {
         ResolvedJavaType a = getType(A.class);
< prev index next >