Fix for Bugzilla Bug 60863
AJC behaves different when using @ to supply parameters
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 8dbd00c..fe11ec6 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -1056,53 +1056,60 @@
continue;
}
//default is input directory
- currentArg = currentArg.replace('/', File.separatorChar);
- if (currentArg.endsWith(File.separator))
- currentArg =
- currentArg.substring(0, currentArg.length() - File.separator.length());
- File dir = new File(currentArg);
- if (!dir.isDirectory())
- throw new InvalidInputException(
- Main.bind("configure.directoryNotExist", currentArg)); //$NON-NLS-1$
- FileFinder finder = new FileFinder();
- try {
- finder.find(dir, SUFFIX_STRING_JAVA, this.verbose); //$NON-NLS-1$
- } catch (Exception e) {
- throw new InvalidInputException(Main.bind("configure.IOError", currentArg)); //$NON-NLS-1$
- }
- if (this.filenames != null) {
- // some source files were specified explicitly
- String results[] = finder.resultFiles;
- int length = results.length;
- System.arraycopy(
- this.filenames,
- 0,
- (this.filenames = new String[length + filesCount]),
- 0,
- filesCount);
- System.arraycopy(
- this.encodings,
- 0,
- (this.encodings = new String[length + filesCount]),
- 0,
- filesCount);
- System.arraycopy(results, 0, this.filenames, filesCount, length);
- for (int i = 0; i < length; i++) {
- this.encodings[filesCount + i] = customEncoding;
- }
- filesCount += length;
- customEncoding = null;
- } else {
- this.filenames = finder.resultFiles;
- filesCount = this.filenames.length;
- this.encodings = new String[filesCount];
- for (int i = 0; i < filesCount; i++) {
- this.encodings[i] = customEncoding;
- }
- customEncoding = null;
- }
- mode = Default;
- continue;
+ // AspectJ Extension
+ // see pr 60863. All directories should have been dealt with at the AspectJ layer - if we have left
+ // anything to be processed here it is an error.
+ throw new InvalidInputException(
+ "unrecognized single argument: \""+currentArg+"\"");
+// currentArg = currentArg.replace('/', File.separatorChar);
+// if (currentArg.endsWith(File.separator))
+// currentArg =
+// currentArg.substring(0, currentArg.length() - File.separator.length());
+// File dir = new File(currentArg);
+// if (!dir.isDirectory())
+// throw new InvalidInputException(
+// "unrecognized input: \""+currentArg+"\"");
+// Main.bind("configure.directoryNotExist", currentArg)); //$NON-NLS-1$
+// FileFinder finder = new FileFinder();
+// try {
+// finder.find(dir, SUFFIX_STRING_JAVA, this.verbose); //$NON-NLS-1$
+// } catch (Exception e) {
+// throw new InvalidInputException(Main.bind("configure.IOError", currentArg)); //$NON-NLS-1$
+// }
+// if (this.filenames != null) {
+// // some source files were specified explicitly
+// String results[] = finder.resultFiles;
+// int length = results.length;
+// System.arraycopy(
+// this.filenames,
+// 0,
+// (this.filenames = new String[length + filesCount]),
+// 0,
+// filesCount);
+// System.arraycopy(
+// this.encodings,
+// 0,
+// (this.encodings = new String[length + filesCount]),
+// 0,
+// filesCount);
+// System.arraycopy(results, 0, this.filenames, filesCount, length);
+// for (int i = 0; i < length; i++) {
+// this.encodings[filesCount + i] = customEncoding;
+// }
+// filesCount += length;
+// customEncoding = null;
+// } else {
+// this.filenames = finder.resultFiles;
+// filesCount = this.filenames.length;
+// this.encodings = new String[filesCount];
+// for (int i = 0; i < filesCount; i++) {
+// this.encodings[i] = customEncoding;
+// }
+// customEncoding = null;
+// }
+// mode = Default;
+// continue;
+ // End AspectJ extension
}
if (printUsageRequired || hasNoFiles(filesCount)) { // AspectJ Extension
printUsage();