23 /*
24 */
25
26
27 package org.graalvm.compiler.jtt.reflect;
28
29 import org.junit.Test;
30
31 import org.graalvm.compiler.jtt.JTTTest;
32
33 public final class Class_newInstance06 extends JTTTest {
34
35 public static final class Class_newInstance {
36
37 @SuppressWarnings("unused")
38 private Class_newInstance(int i) {
39 // do nothing. xx
40 }
41 }
42
43 @SuppressWarnings("deprecation")
44 public static boolean test(int i) throws IllegalAccessException, InstantiationException {
45 if (i == 0) {
46 return Class_newInstance.class.newInstance() != null;
47 }
48 return false;
49 }
50
51 @Test
52 public void run0() throws Throwable {
53 runTest("test", 0);
54 }
55
56 @Test
57 public void run1() throws Throwable {
58 runTest("test", 4);
59 }
60
61 }
|
23 /*
24 */
25
26
27 package org.graalvm.compiler.jtt.reflect;
28
29 import org.junit.Test;
30
31 import org.graalvm.compiler.jtt.JTTTest;
32
33 public final class Class_newInstance06 extends JTTTest {
34
35 public static final class Class_newInstance {
36
37 @SuppressWarnings("unused")
38 private Class_newInstance(int i) {
39 // do nothing. xx
40 }
41 }
42
43 @SuppressWarnings({"deprecation", "unused"})
44 public static boolean test(int i) throws IllegalAccessException, InstantiationException {
45 if (i == 0) {
46 return Class_newInstance.class.newInstance() != null;
47 }
48 return false;
49 }
50
51 @Test
52 public void run0() throws Throwable {
53 runTest("test", 0);
54 }
55
56 @Test
57 public void run1() throws Throwable {
58 runTest("test", 4);
59 }
60
61 }
|