### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.compiler.tool.tests Index: src/org/eclipse/jdt/compiler/tool/tests/CompilerInvocationTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerInvocationTests.java,v retrieving revision 1.2 diff -u -r1.2 CompilerInvocationTests.java --- src/org/eclipse/jdt/compiler/tool/tests/CompilerInvocationTests.java 14 Apr 2008 12:55:44 -0000 1.2 +++ src/org/eclipse/jdt/compiler/tool/tests/CompilerInvocationTests.java 15 Apr 2008 06:51:56 -0000 @@ -347,7 +347,7 @@ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=226918 // options consumption -public void _test007_options_consumption() throws IOException { +public void test007_options_consumption() throws IOException { List remainingAsList = Arrays.asList("output", "remainder"); StandardJavaFileManager ecjStandardJavaFileManager = COMPILER.getStandardFileManager(null /* diagnosticListener */, null /* locale */, null /* charset */); #P org.eclipse.jdt.compiler.tool Index: src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java,v retrieving revision 1.7 diff -u -r1.7 EclipseFileManager.java --- src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java 15 Nov 2007 17:49:12 -0000 1.7 +++ src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java 15 Apr 2008 06:51:57 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 IBM Corporation and others. + * Copyright (c) 2006, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -603,7 +603,6 @@ public boolean handleOption(String current, Iterator remaining) { try { if ("-bootclasspath".equals(current)) {//$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { final Iterable bootclasspaths = getPathsFrom(remaining.next()); if (bootclasspaths != null) { @@ -622,7 +621,6 @@ prependFiles(iterable, bootclasspaths)); } } - remaining.remove(); this.flags |= HAS_BOOTCLASSPATH; return true; } else { @@ -630,7 +628,6 @@ } } if ("-classpath".equals(current) || "-cp".equals(current)) {//$NON-NLS-1$//$NON-NLS-2$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { final Iterable classpaths = getPathsFrom(remaining.next()); if (classpaths != null) { @@ -645,40 +642,33 @@ setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, classpaths); } } - remaining.remove(); return true; } else { throw new IllegalArgumentException(); } } if ("-encoding".equals(current)) {//$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { this.charset = Charset.forName(remaining.next()); - remaining.remove(); return true; } else { throw new IllegalArgumentException(); } } if ("-sourcepath".equals(current)) {//$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { final Iterable sourcepaths = getPathsFrom(remaining.next()); if (sourcepaths != null) setLocation(StandardLocation.SOURCE_PATH, sourcepaths); - remaining.remove(); return true; } else { throw new IllegalArgumentException(); } } if ("-extdirs".equals(current)) {//$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { Iterable iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); setLocation(StandardLocation.PLATFORM_CLASS_PATH, concatFiles(iterable, getExtdirsFrom(remaining.next()))); - remaining.remove(); this.flags |= HAS_EXT_DIRS; return true; } else { @@ -686,12 +676,10 @@ } } if ("-endorseddirs".equals(current)) {//$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { Iterable iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); setLocation(StandardLocation.PLATFORM_CLASS_PATH, prependFiles(iterable, getEndorsedDirsFrom(remaining.next()))); - remaining.remove(); this.flags |= HAS_ENDORSED_DIRS; return true; } else { @@ -699,39 +687,33 @@ } } if ("-d".equals(current)) { //$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { final Iterable outputDir = getOutputDir(remaining.next()); if (outputDir != null) { setLocation(StandardLocation.CLASS_OUTPUT, outputDir); } - remaining.remove(); return true; } else { throw new IllegalArgumentException(); } } if ("-s".equals(current)) { //$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { final Iterable outputDir = getOutputDir(remaining.next()); if (outputDir != null) { setLocation(StandardLocation.SOURCE_OUTPUT, outputDir); } - remaining.remove(); return true; } else { throw new IllegalArgumentException(); } } if ("-processorpath".equals(current)) {//$NON-NLS-1$ - remaining.remove(); // remove the current option if (remaining.hasNext()) { final Iterable processorpaths = getPathsFrom(remaining.next()); if (processorpaths != null) { setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, processorpaths); } - remaining.remove(); this.flags |= HAS_PROCESSORPATH; return true; } else {