< prev index next >

test/hotspot/jtreg/compiler/escapeAnalysis/TestGetClass.java

Print this page
@@ -34,14 +34,14 @@
   */
  
  package compiler.escapeAnalysis;
  
  public class TestGetClass {
-     static Object obj = new Object();
+     static Object obj = new Object() {};
  
      public static boolean test() {
-         if (obj.getClass() == Object.class) {
+         if (obj.getClass().getSuperclass() == Object.class) {
              synchronized (obj) {
                  return true;
              }
          }
          return false;
< prev index next >