Skip to content

Commit 94c1e42

Browse files
committed
make use of the "graal." prefix for Graal options an error
1 parent c6fd7c7 commit 94c1e42

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

compiler/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
This changelog summarizes newly introduced optimizations and other compiler related changes.
44

5+
## GraalVM for JDK 26 (Internal Version 26.0.0)
6+
* (GR-54646): Using the `graal.` prefix for Graal options is no longer supported and causes an error at startup.
7+
For example:
8+
```
9+
> java -Dgraal.ShowConfiguration=info Hello.java
10+
Error parsing Graal options: The 'graal.' prefix for ShowConfiguration is unsupported - use 'jdk.graal.ShowConfiguration' instead.
11+
Error: A fatal exception has occurred. Program will exit.
12+
```
13+
514
## GraalVM for JDK 25 (Internal Version 25.0.0)
615
* (GR-60088): This PR adds the `org.graalvm.nativeimage.libgraal` SDK module. With this module, all logic for building
716
libgraal has been moved into the compiler suite in a new `jdk.graal.compiler.libgraal` module

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/HotSpotGraalOptionValues.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,14 @@ public class HotSpotGraalOptionValues {
5959
* {@code GRAAL_OPTION_PROPERTY_PREFIX + "MyOption"}.
6060
*/
6161
public static final String GRAAL_OPTION_PROPERTY_PREFIX = "jdk.graal.";
62-
public static final String LEGACY_GRAAL_OPTION_PROPERTY_PREFIX = "graal.";
62+
63+
private static final String LEGACY_GRAAL_OPTION_PROPERTY_PREFIX = "graal.";
6364

6465
/**
6566
* Prefix for system properties that correspond to libgraal Native Image options.
6667
*/
6768
public static final String LIBGRAAL_VM_OPTION_PROPERTY_PREFIX = "jdk.graal.internal.";
6869

69-
/**
70-
* Guard for issuing warning about deprecated Graal option prefix at most once.
71-
*/
72-
private static final GlobalAtomicLong LEGACY_OPTION_DEPRECATION_WARNED = new GlobalAtomicLong("LEGACY_OPTION_DEPRECATION_WARNED", 0L);
73-
7470
/**
7571
* Gets the system property assignment that would set the current value for a given option.
7672
*/
@@ -114,14 +110,8 @@ public static EconomicMap<OptionKey<?>, Object> parseOptions() {
114110
String name = e.getKey();
115111
if (name.startsWith(LEGACY_GRAAL_OPTION_PROPERTY_PREFIX)) {
116112
String baseName = name.substring(LEGACY_GRAAL_OPTION_PROPERTY_PREFIX.length());
117-
name = GRAAL_OPTION_PROPERTY_PREFIX + baseName;
118-
if (LEGACY_OPTION_DEPRECATION_WARNED.compareAndSet(0L, 1L)) {
119-
System.err.printf("""
120-
WARNING: The 'graal.' property prefix for the Graal option %s
121-
WARNING: (and all other Graal options) is deprecated and will be ignored
122-
WARNING: in a future release. Please use 'jdk.graal.%s' instead.%n""",
123-
baseName, baseName);
124-
}
113+
String msg = String.format("The 'graal.' prefix for %s is unsupported - use 'jdk.graal.%s' instead.", baseName, baseName);
114+
throw new IllegalArgumentException(msg);
125115
}
126116
if (name.startsWith(GRAAL_OPTION_PROPERTY_PREFIX)) {
127117
if (name.startsWith(LIBGRAAL_VM_OPTION_PROPERTY_PREFIX)) {

0 commit comments

Comments
 (0)