< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java

Print this page




 140             }
 141             if (!Java8OrEarlier) {
 142                 // @formatter:off
 143                 /*
 144                  * Work around to prevent:
 145                  *
 146                  * org.graalvm.compiler.debug.GraalError: java.lang.IllegalAccessError: class org.graalvm.compiler.serviceprovider.GraalServices$Lazy (in module
 147                  * jdk.internal.vm.compiler) cannot access class java.lang.management.ManagementFactory (in module java.management) because module
 148                  * jdk.internal.vm.compiler does not read module java.management
 149                  *     at jdk.internal.vm.compiler/org.graalvm.compiler.debug.GraalError.shouldNotReachHere(GraalError.java:55)
 150                  *     at org.graalvm.compiler.core.test.CheckGraalInvariants$InvariantsTool.handleClassLoadingException(CheckGraalInvariants.java:149)
 151                  *     at org.graalvm.compiler.core.test.CheckGraalInvariants.initializeClasses(CheckGraalInvariants.java:321)
 152                  *     at org.graalvm.compiler.core.test.CheckGraalInvariants.runTest(CheckGraalInvariants.java:239)
 153                  *
 154                  * which occurs because JDK8 overlays are in modular jars. They are never used normally.
 155                  */
 156                 // @formatter:on
 157                 if (className.equals("org.graalvm.compiler.serviceprovider.GraalServices$Lazy")) {
 158                     return false;
 159                 }




 160             }
 161             return true;
 162         }
 163 
 164         protected void handleClassLoadingException(Throwable t) {
 165             GraalError.shouldNotReachHere(t);
 166         }
 167 
 168         protected void handleParsingException(Throwable t) {
 169             GraalError.shouldNotReachHere(t);
 170         }
 171 
 172         public boolean shouldVerifyFoldableMethods() {
 173             return true;
 174         }
 175     }
 176 
 177     @Test
 178     @SuppressWarnings("try")
 179     public void test() {




 140             }
 141             if (!Java8OrEarlier) {
 142                 // @formatter:off
 143                 /*
 144                  * Work around to prevent:
 145                  *
 146                  * org.graalvm.compiler.debug.GraalError: java.lang.IllegalAccessError: class org.graalvm.compiler.serviceprovider.GraalServices$Lazy (in module
 147                  * jdk.internal.vm.compiler) cannot access class java.lang.management.ManagementFactory (in module java.management) because module
 148                  * jdk.internal.vm.compiler does not read module java.management
 149                  *     at jdk.internal.vm.compiler/org.graalvm.compiler.debug.GraalError.shouldNotReachHere(GraalError.java:55)
 150                  *     at org.graalvm.compiler.core.test.CheckGraalInvariants$InvariantsTool.handleClassLoadingException(CheckGraalInvariants.java:149)
 151                  *     at org.graalvm.compiler.core.test.CheckGraalInvariants.initializeClasses(CheckGraalInvariants.java:321)
 152                  *     at org.graalvm.compiler.core.test.CheckGraalInvariants.runTest(CheckGraalInvariants.java:239)
 153                  *
 154                  * which occurs because JDK8 overlays are in modular jars. They are never used normally.
 155                  */
 156                 // @formatter:on
 157                 if (className.equals("org.graalvm.compiler.serviceprovider.GraalServices$Lazy")) {
 158                     return false;
 159                 }
 160             } else {
 161                 if (className.equals("jdk.vm.ci.services.JVMCIClassLoaderFactory")) {
 162                     return false;
 163                 }
 164             }
 165             return true;
 166         }
 167 
 168         protected void handleClassLoadingException(Throwable t) {
 169             GraalError.shouldNotReachHere(t);
 170         }
 171 
 172         protected void handleParsingException(Throwable t) {
 173             GraalError.shouldNotReachHere(t);
 174         }
 175 
 176         public boolean shouldVerifyFoldableMethods() {
 177             return true;
 178         }
 179     }
 180 
 181     @Test
 182     @SuppressWarnings("try")
 183     public void test() {


< prev index next >