JDK-8029149 : test/compiler/regalloc/C1ObjectSpillInLogicOp.java fails with java.lang.IllegalAccessException
  • Type: Bug
  • Component: hotspot
  • Sub-Component: test
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2013-11-26
  • Updated: 2013-12-01
  • Resolved: 2013-12-01
Related Reports
Relates :  
Description
When running the test through jtreg it complains about not being able to access a public static method:

java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class C1ObjectSpillInLogicOp with modifiers "public static"

The problem is that the class is not public.

diff -r c302ab46defe test/compiler/regalloc/C1ObjectSpillInLogicOp.java
--- a/test/compiler/regalloc/C1ObjectSpillInLogicOp.java	Mon Nov 25 18:40:26 2013 -0800
+++ b/test/compiler/regalloc/C1ObjectSpillInLogicOp.java	Mon Nov 25 20:46:59 2013 -0800
@@ -34,8 +34,9 @@
  */
 
 import java.util.concurrent.atomic.*;
-class C1ObjectSpillInLogicOp {
-  static public void main(String[] args) {
+
+public class C1ObjectSpillInLogicOp {
+  public static void main(String[] args) {
     AtomicReferenceArray<Integer> x = new AtomicReferenceArray(128);
     Integer y = new Integer(0);
     for (int i = 0; i < 50000; i++) {