RFR: 8073989: Deprecated integer options are now recognized as obsolete.

Max Ockner max.ockner at oracle.com
Mon Mar 30 18:08:08 UTC 2015


Hello all,
Please review this change involving the handling of obsolete command 
line flags.

Bug: https://bugs.openjdk.java.net/browse/JDK-8073989
Webrev: http://cr.openjdk.java.net/~mockner/8073989.2/

Summary: Three key components to this bug:

(1) When is_newly_obsolete() checks for "SomeObsoleteIntegerFlag=100" in 
the flag table, it is not recognized as a match with 
"SomeObsoleteIntegerFlag" because the lengths are different. This has 
been fixed. Arguments:process_argument() now strips everything except 
for the arguments name. (example: -XX:+SomeBooleanFlag -> 
"SomeBooleanFlag", and -XX:SomeIntegerFlag=100 -> "SomeIntegerFlag") 
This stripped argument name (fittingly called stripped_argname) is now 
passed into is_newly_obsolete, preventing the length check from failing 
on obsolete (but formeerly valid) arguments. It also eliminates the need 
for any case work and other string gymnastics from the the body of 
is_newly_obsolete. If the argument is found to be newly obsolete, the 
warning message now prints stripped_argname instead of argname to avoid 
suggesting that "SomeBooleanFlag=100" was ever a supported option.

(2) Some flags used to be defined in both the flags table and the 
obsolete flags table. Because of this, those obsolete flags which were 
also defined in the flags table could be fuzzy matched to provide better 
error messages. Now that no flag is allowed to be in both tables, it is 
pointless to attempt to fuzzy match an obsolete flag, since fuzzy 
matching only looks in the flags table (not the obsolete flags table). 
The section at the end of Arguments:process_argument in which fuzzy 
matching is attempted on obsolete arguments  no longer makes sense and 
has been removed.

(3) ObsoleteFlagErrorMessage.java has been modified. The existing test 
for an obsolete flag with appended junk no longer tests for fuzzy 
matching, and a second test case has been added for integer valued flags.

Tested with jtreg runtime tests.

Thanks,
Max Ockner


More information about the hotspot-dev mailing list