< prev index next >

test/compiler/c2/Test6910605_2.java

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

@@ -25,21 +25,24 @@
 /**
  * @test
  * @bug 6910605
  * @summary C2: NullPointerException/ClassCaseException is thrown when C2 with DeoptimizeALot is used
  *
- * @run main/othervm -Xmx64m -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeALot -XX:+DoEscapeAnalysis -Xbatch -XX:InlineSmallCode=2000 Test
- *
+ * @run main/othervm -Xmx64m -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeALot
+ *      -XX:+DoEscapeAnalysis -Xbatch -XX:InlineSmallCode=2000
+ *      compiler.c2.Test6910605_2
  */
 
+package compiler.c2;
+
 /*
  * Added InlineSmallCode=2000 to guaranty inlining of StringBuilder::append() to allow scalar replace StringBuilder object.
  *
  * original test: gc/gctests/StringGC
  */
 
-public class Test {
+public class Test6910605_2 {
         private final String toAdd = "0123456789abcdef";
         private int maxLength;
         private static final int numberOfThreads = 8;
 
         private class StringAdder extends Thread {

@@ -46,19 +49,20 @@
                 private String s;
 
                 public void test() {
                         s = s + toAdd;
                 }
+
                 public void run() {
                         do {
                                 test();
                         } while (s.length() < maxLength);
                  }
         }
 
         public void test() throws InterruptedException {
-                maxLength = toAdd.length() * 15000/ numberOfThreads;
+        maxLength = toAdd.length() * 15000 / numberOfThreads;
                 StringAdder[] sa = new StringAdder[numberOfThreads];
                 for (int i = 0; i < numberOfThreads; i++) {
                         sa[i] = new StringAdder();
                         sa[i].start();
                 }

@@ -66,9 +70,9 @@
                         sa[i].join();
                 }
         }
 
         public static void main(String[] args) throws InterruptedException {
-                Test t = new Test();
+        Test6910605_2 t = new Test6910605_2();
                 t.test();
         }
 }
< prev index next >