< prev index next >

test/compiler/c2/Test6851282.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke

@@ -25,17 +25,20 @@
 /**
  * @test
  * @bug 6851282
  * @summary JIT miscompilation results in null entry in array when using CompressedOops
  *
- * @run main/othervm/timeout=600 -Xmx256m -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops Test
+ * @run main/othervm/timeout=600 -Xmx256m -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops
+ *    compiler.c2.Test6851282
  */
 
+package compiler.c2;
+
 import java.util.ArrayList;
 import java.util.List;
 
-public class Test {
+public class Test6851282 {
   void foo(A a, A[] as) {
     for (A a1 : as) {
       B[] filtered = a.c(a1);
       for (B b : filtered) {
         if (b == null) {

@@ -52,15 +55,14 @@
       List<B> bs = new ArrayList<B>();
       for (int j = i; j < i + 1000; j++)
         bs.add(new B(j));
       as.add(new A(bs.toArray(new B[0])));
     }
-    new Test().foo(as.get(0), as.subList(1, as.size()).toArray(new A[0]));
+    new Test6851282().foo(as.get(0), as.subList(1, as.size()).toArray(new A[0]));
   }
-}
 
-class A {
+  static class A {
   final B[] bs;
 
   public A(B[] bs) {
     this.bs = bs;
   }

@@ -74,13 +76,13 @@
         }
         return false;
       }
     });
   }
-}
+  }
 
-class BoxedArray<T> {
+  static class BoxedArray<T> {
 
   private final T[] array;
 
   BoxedArray(T[] array) {
     this.array = array;

@@ -107,18 +109,20 @@
       }
       i += 1;
     }
     return result;
   }
-}
+  }
 
-interface Function<T, R> {
+  static interface Function<T, R> {
   R apply(T arg);
-}
+  }
 
-class B {
+  static class B {
   final int d;
+
   public B(int d) {
     this.d = d;
   }
+  }
 }
 
< prev index next >