File tree 5 files changed +27
-8
lines changed
java/lang/invoke/defineHiddenClass
5 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,16 @@ requires.extraPropDefns.bootlibs = ../../lib/jdk/test/whitebox
46
46
requires.extraPropDefns.libs = \
47
47
../../lib/jdk/test/lib/Platform.java \
48
48
../../lib/jdk/test/lib/Container.java
49
- requires.extraPropDefns.javacOpts = --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
49
+ requires.extraPropDefns.javacOpts = \
50
+ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
51
+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
50
52
requires.extraPropDefns.vmOpts = \
51
53
-XX:+UnlockDiagnosticVMOptions \
52
54
-XX:+LogVMOutput -XX:-DisplayVMOutput -XX:LogFile=vmprops.flags.final.vm.log \
53
55
-XX:+PrintFlagsFinal \
54
56
-XX:+WhiteBoxAPI \
55
- --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
57
+ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
58
+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
56
59
requires.properties= \
57
60
sun.arch.data.model \
58
61
vm.simpleArch \
Original file line number Diff line number Diff line change @@ -74,16 +74,20 @@ requires.extraPropDefns.bootlibs = ../lib/jdk/test/whitebox
74
74
requires.extraPropDefns.libs = \
75
75
../lib/jdk/test/lib/Platform.java \
76
76
../lib/jdk/test/lib/Container.java
77
- requires.extraPropDefns.javacOpts = --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
77
+ requires.extraPropDefns.javacOpts = \
78
+ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
79
+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
78
80
requires.extraPropDefns.vmOpts = \
79
81
-XX:+UnlockDiagnosticVMOptions \
80
82
-XX:+LogVMOutput -XX:-DisplayVMOutput -XX:LogFile=vmprops.flags.final.vm.log \
81
83
-XX:+PrintFlagsFinal \
82
84
-XX:+WhiteBoxAPI \
83
- --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
85
+ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
86
+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
84
87
requires.properties= \
85
88
sun.arch.data.model \
86
89
java.runtime.name \
90
+ java.enablePreview \
87
91
vm.flagless \
88
92
vm.gc.G1 \
89
93
vm.gc.Serial \
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2021, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2021, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
26
26
* @bug 8245432
27
27
* @modules jdk.compiler
28
28
* @library /test/lib
29
+ * @requires !java.enablePreview
29
30
* @build jdk.test.lib.Utils
30
31
* jdk.test.lib.compiler.CompilerUtils
31
32
* @run testng PreviewHiddenClass
Original file line number Diff line number Diff line change 50
50
import java .util .stream .Stream ;
51
51
52
52
import jdk .internal .foreign .CABI ;
53
+ import jdk .internal .misc .PreviewFeatures ;
53
54
import jdk .test .whitebox .code .Compiler ;
54
55
import jdk .test .whitebox .cpuinfo .CPUInfo ;
55
56
import jdk .test .whitebox .gc .GC ;
@@ -129,6 +130,7 @@ public Map<String, String> call() {
129
130
map .put ("vm.graal.enabled" , this ::isGraalEnabled );
130
131
// jdk.hasLibgraal is true if the libgraal shared library file is present
131
132
map .put ("jdk.hasLibgraal" , this ::hasLibgraal );
133
+ map .put ("java.enablePreview" , this ::isPreviewEnabled );
132
134
map .put ("vm.libgraal.jit" , this ::isLibgraalJIT );
133
135
map .put ("vm.compiler1.enabled" , this ::isCompiler1Enabled );
134
136
map .put ("vm.compiler2.enabled" , this ::isCompiler2Enabled );
@@ -586,6 +588,9 @@ protected String isCompiler2Enabled() {
586
588
return "" + Compiler .isC2Enabled ();
587
589
}
588
590
591
+ protected String isPreviewEnabled () {
592
+ return "" + PreviewFeatures .isEnabled ();
593
+ }
589
594
/**
590
595
* A simple check for container support
591
596
*
Original file line number Diff line number Diff line change @@ -37,10 +37,16 @@ requires.extraPropDefns.bootlibs = ../lib/jdk/test/whitebox
37
37
requires.extraPropDefns.libs = \
38
38
../lib/jdk/test/lib/Platform.java \
39
39
../lib/jdk/test/lib/Container.java
40
- requires.extraPropDefns.javacOpts = --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
40
+ requires.extraPropDefns.javacOpts = \
41
+ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
42
+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
41
43
requires.extraPropDefns.vmOpts = \
42
- -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI \
43
- --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
44
+ -XX:+UnlockDiagnosticVMOptions \
45
+ -XX:+LogVMOutput -XX:-DisplayVMOutput -XX:LogFile=vmprops.flags.final.vm.log \
46
+ -XX:+PrintFlagsFinal \
47
+ -XX:+WhiteBoxAPI \
48
+ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
49
+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
44
50
requires.properties= \
45
51
vm.continuations \
46
52
vm.debug
You can’t perform that action at this time.
0 commit comments