RFR: JDK-8243417 Clean up com.sun.tools.javac.main.CommandLine

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Apr 24 18:32:25 UTC 2020


javac folk,

Please review a small cleanup to the code to handle @file expansion.

Pavel recently noted that the consumers of CommandLine.parse all 
eventually wanted Lists, which is the primary internal form inside 
CommandLine, but that the clients were all using array-based wrappers, 
causing unnecessary conversions between the two forms.

The fix is to have the clients use the List-based methods, and to remove 
the legacy array-based methods.  In some of the javac code, 
Iterable<String> is used to store the result, to avoid confusion with 
javac's internal List class.

-- Jon

JBS: https://bugs.openjdk.java.net/browse/JDK-8243417
Webrev: http://cr.openjdk.java.net/~jjg/8243417/webrev.00/



More information about the compiler-dev mailing list