jdk/src/share/classes/sun/tools/util/CommandLine.java
changeset 25799 1afc4675dc75
parent 22567 5816a47fa4dd
equal deleted inserted replaced
25798:0b2f54e47bc4 25799:1afc4675dc75
    52      * the sequence '@@'.
    52      * the sequence '@@'.
    53      */
    53      */
    54     public static String[] parse(String[] args)
    54     public static String[] parse(String[] args)
    55         throws IOException
    55         throws IOException
    56     {
    56     {
    57         ArrayList newArgs = new ArrayList(args.length);
    57         ArrayList<String> newArgs = new ArrayList<>(args.length);
    58         for (int i = 0; i < args.length; i++) {
    58         for (int i = 0; i < args.length; i++) {
    59             String arg = args[i];
    59             String arg = args[i];
    60             if (arg.length() > 1 && arg.charAt(0) == '@') {
    60             if (arg.length() > 1 && arg.charAt(0) == '@') {
    61                 arg = arg.substring(1);
    61                 arg = arg.substring(1);
    62                 if (arg.charAt(0) == '@') {
    62                 if (arg.charAt(0) == '@') {
    66                 }
    66                 }
    67             } else {
    67             } else {
    68                 newArgs.add(arg);
    68                 newArgs.add(arg);
    69             }
    69             }
    70         }
    70         }
    71         return (String[])newArgs.toArray(new String[newArgs.size()]);
    71         return newArgs.toArray(new String[newArgs.size()]);
    72     }
    72     }
    73 
    73 
    74     private static void loadCmdFile(String name, List args)
    74     private static void loadCmdFile(String name, List<String> args)
    75         throws IOException
    75         throws IOException
    76     {
    76     {
    77         Reader r = new BufferedReader(new FileReader(name));
    77         Reader r = new BufferedReader(new FileReader(name));
    78         StreamTokenizer st = new StreamTokenizer(r);
    78         StreamTokenizer st = new StreamTokenizer(r);
    79         st.resetSyntax();
    79         st.resetSyntax();