@@ -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