--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java Mon Feb 25 08:21:37 2019 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java Tue Feb 26 12:03:51 2019 -0500
@@ -494,18 +494,9 @@
private void initArgumentList(String[] args) throws PackagerException {
argList = new ArrayList<String>(args.length);
for (String arg : args) {
- if (arg.startsWith("@")) {
- if (arg.length() > 1) {
- String filename = arg.substring(1);
- argList.addAll(extractArgList(filename));
- } else {
- throw new PackagerException("ERR_InvalidOption", arg);
- }
- } else {
- argList.add(arg);
- }
+ argList.add(arg);
}
- Log.debug ("\nJPackage argument list: \n" + argList + "\n");
+ Log.debug ("\njpackage argument list: \n" + argList + "\n");
pos = 0;
deployParams = new DeployParams();
@@ -516,47 +507,6 @@
secondaryLaunchers = new ArrayList<>();
}
- private List<String> extractArgList(String filename) {
- List<String> args = new ArrayList<String>();
- try {
- File f = new File(filename);
- if (f.exists()) {
- List<String> lines = Files.readAllLines(f.toPath());
- for (String line : lines) {
- String [] qsplit;
- String quote = "\"";
- if (line.contains("\"")) {
- qsplit = line.split("\"");
- } else {
- qsplit = line.split("\'");
- quote = "\'";
- }
- for (int i=0; i<qsplit.length; i++) {
- // every other qsplit of line is a quoted string
- if ((i & 1) == 0) {
- // non-quoted string - split by whitespace
- String [] newargs = qsplit[i].split("\\s");
- for (String newarg : newargs) {
- args.add(newarg);
- }
- } else {
- // quoted string - don't split by whitespace
- args.add(qsplit[i]);
- }
- }
- }
- } else {
- Log.info(MessageFormat.format(I18N.getString(
- "warning.missing.arg.file"), f));
- }
- } catch (IOException ioe) {
- Log.verbose(ioe.getMessage());
- Log.verbose(ioe);
- }
- return args;
- }
-
-
public boolean processArguments() throws Exception {
try {