RFR:8060449:Proper error messages for newly obsolete command line flags.

Max Ockner max.ockner at oracle.com
Fri Nov 7 19:13:29 UTC 2014


ID: 8060449
webrev: http://cr.openjdk.java.net/~coleenp/8060449/

Summary: A "newly obsolete" command line option is one which is no 
longer supported, but still is acknowledged. There is a list of these in 
arguments.cpp.
It used to be that only a fixed number of characters were checked when 
comparing a given command line option to the list of obsolete flags 
(strncmp was used, where the number of characters to check is equal to 
the length of the flag name from the table.)
As a result, an arbitrary string appended to the end of an obsolete 
argument goes unnoticed.
This issue is fixed by comparing the lengths of the given flag and the 
flags from the obsolete flags table.
When a misspelled flag is fuzzy-matched to an obsolete flag, an 
appropriate warning is given to save the user a few key strokes: (1) 
unrecognized option [bad option]. (2) Did you mean [option]? (3) 
[option] is obsolete as of [version])

A new test for this feature checks for the presence of all three 
components of the above error message.

Tested with: vm.quick.testlist
              hotspot jtreg tests
              jprt

Thanks for your help!
Max Ockner


More information about the hotspot-dev mailing list