Drop old preloader command-line interface, use new one instead
This commit is contained in:
@@ -26,7 +26,7 @@ import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.*;
|
||||
|
||||
@SuppressWarnings({"CallToPrintStackTrace", "UseOfSystemOutOrSystemErr"})
|
||||
@SuppressWarnings("UseOfSystemOutOrSystemErr")
|
||||
public class Preloader {
|
||||
public static final int DEFAULT_CLASS_NUMBER_ESTIMATE = 4096;
|
||||
|
||||
@@ -87,14 +87,8 @@ public class Preloader {
|
||||
return new URLClassLoader(classpath, parent);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"AssignmentToForLoopParameter", "ConstantConditions"})
|
||||
@SuppressWarnings("AssignmentToForLoopParameter")
|
||||
private static Options parseOptions(String[] args) throws Exception {
|
||||
// TODO: remove this temporary workaround as soon as the new command-line interface is bootstrapped
|
||||
if (args.length >= 3 && "4096".equals(args[2])) {
|
||||
//noinspection deprecation
|
||||
return oldOptions(args);
|
||||
}
|
||||
|
||||
List<File> classpath = Collections.emptyList();
|
||||
boolean measure = false;
|
||||
List<File> instrumenters = Collections.emptyList();
|
||||
@@ -137,14 +131,6 @@ public class Preloader {
|
||||
return new Options(classpath, measure, instrumenters, estimate, mainClass, arguments);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static Options oldOptions(String[] args) {
|
||||
return new Options(
|
||||
parseClassPath(args[0]), false, Collections.<File>emptyList(), 4096, args[1],
|
||||
Arrays.asList(Arrays.copyOfRange(args, 4, args.length))
|
||||
);
|
||||
}
|
||||
|
||||
private static List<File> parseClassPath(String classpath) {
|
||||
String[] paths = classpath.split(File.pathSeparator);
|
||||
List<File> files = new ArrayList<File>(paths.length);
|
||||
|
||||
Reference in New Issue
Block a user