Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 96044 Details for
Bug 226918
[jsr199] the standard java file manager returned by the Eclipse compiler does not accept non-modifiable iterators as remaining arg to JavaFileManager#handleOption
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Tentative fix + test case
patch.txt (text/plain), 6.21 KB, created by
Maxime Daniel
on 2008-04-15 03:00:52 EDT
(
hide
)
Description:
Tentative fix + test case
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2008-04-15 03:00:52 EDT
Size:
6.21 KB
patch
obsolete
>### 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<String> 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<String> remaining) { > try { > if ("-bootclasspath".equals(current)) {//$NON-NLS-1$ >- remaining.remove(); // remove the current option > if (remaining.hasNext()) { > final Iterable<? extends File> 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<? extends File> 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<? extends File> 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<? extends File> 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<? extends File> 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<? extends File> 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<? extends File> 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<? extends File> processorpaths = getPathsFrom(remaining.next()); > if (processorpaths != null) { > setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, processorpaths); > } >- remaining.remove(); > this.flags |= HAS_PROCESSORPATH; > return true; > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226918
:
96044
|
96204