RFR: 6522873 - Java not print "Unrecognized option" when it is invalid option.

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Fri Dec 5 13:39:42 UTC 2014


Please review this patch to make argument parsing stop accepting random 
characters at the end of command line flags. This topic was discussed in 
hotspot-dev at openjdk.java.net and I strongly believe that this bug should be 
reopened and fixed.

Short summary of the problem:
Today some (not all) flags are accepted even though they have random characters 
appended to them. Some examples are -Xconcgc, -Xcomp, -Xboundthreads, 
-XX:+AlwaysTenure etc which will also be accepted when written for instance 
-Xconcgcnoway, -Xcomposer, -Xboundthreadstodogs or -XX:+AlwaysTenureAtBlueMoon

There is a potential problem here since we will also accept things like 
-XX:+ExtendedDTraceProbes-XX:+UseG1GC without saying a word (and of course 
without running with G1).

Bug: https://bugs.openjdk.java.net/browse/JDK-6522873
Webrev: http://cr.openjdk.java.net/~jwilhelm/6522873/webrev.00/

The full list of flags affected by this change is:



More information about the hotspot-runtime-dev mailing list