@Test public void parseFileList_empty() { List<File> result = canonicalize(CommandLineUtil.parseFileList("")); assertThat(result, is(Collections.emptyList())); }
public static List<File> parseFileList(String fileListOrNull) { if (fileListOrNull == null || fileListOrNull.isEmpty()) { return Collections.emptyList(); } List<File> results = new ArrayList<>(); int start = 0; while (true) { int index = fileListOrNull.indexOf(File.pathSeparatorChar, start); if (index < 0) { break; } if (start != index) { results.add(new File(fileListOrNull.substring(start, index).trim())); } start = index + 1; } results.add(new File(fileListOrNull.substring(start).trim())); return results; }
CommandLineUtil { public static List<File> parseFileList(String fileListOrNull) { if (fileListOrNull == null || fileListOrNull.isEmpty()) { return Collections.emptyList(); } List<File> results = new ArrayList<>(); int start = 0; while (true) { int index = fileListOrNull.indexOf(File.pathSeparatorChar, start); if (index < 0) { break; } if (start != index) { results.add(new File(fileListOrNull.substring(start, index).trim())); } start = index + 1; } results.add(new File(fileListOrNull.substring(start).trim())); return results; } }
CommandLineUtil { public static List<File> parseFileList(String fileListOrNull) { if (fileListOrNull == null || fileListOrNull.isEmpty()) { return Collections.emptyList(); } List<File> results = new ArrayList<>(); int start = 0; while (true) { int index = fileListOrNull.indexOf(File.pathSeparatorChar, start); if (index < 0) { break; } if (start != index) { results.add(new File(fileListOrNull.substring(start, index).trim())); } start = index + 1; } results.add(new File(fileListOrNull.substring(start).trim())); return results; } private  CommandLineUtil(); }
CommandLineUtil { public static List<File> parseFileList(String fileListOrNull) { if (fileListOrNull == null || fileListOrNull.isEmpty()) { return Collections.emptyList(); } List<File> results = new ArrayList<>(); int start = 0; while (true) { int index = fileListOrNull.indexOf(File.pathSeparatorChar, start); if (index < 0) { break; } if (start != index) { results.add(new File(fileListOrNull.substring(start, index).trim())); } start = index + 1; } results.add(new File(fileListOrNull.substring(start).trim())); return results; } private  CommandLineUtil(); static void prepareLogContext(); static Properties loadProperties(File path); static List<File> parseFileList(String fileListOrNull); static ClassLoader buildPluginLoader(ClassLoader parent, List<File> files); static List<Extension> loadExtensions(ClassLoader classLoader, List<ExtendedArgument> arguments); }
CommandLineUtil { public static List<File> parseFileList(String fileListOrNull) { if (fileListOrNull == null || fileListOrNull.isEmpty()) { return Collections.emptyList(); } List<File> results = new ArrayList<>(); int start = 0; while (true) { int index = fileListOrNull.indexOf(File.pathSeparatorChar, start); if (index < 0) { break; } if (start != index) { results.add(new File(fileListOrNull.substring(start, index).trim())); } start = index + 1; } results.add(new File(fileListOrNull.substring(start).trim())); return results; } private  CommandLineUtil(); static void prepareLogContext(); static Properties loadProperties(File path); static List<File> parseFileList(String fileListOrNull); static ClassLoader buildPluginLoader(ClassLoader parent, List<File> files); static List<Extension> loadExtensions(ClassLoader classLoader, List<ExtendedArgument> arguments); static final String LOG_CONTEXT_PREFIX; static final String SCHEME_CLASSPATH; }