|
Lines 23-28
Link Here
|
| 23 |
import java.util.Arrays; |
23 |
import java.util.Arrays; |
| 24 |
import java.util.HashMap; |
24 |
import java.util.HashMap; |
| 25 |
import java.util.Iterator; |
25 |
import java.util.Iterator; |
|
|
26 |
import java.util.List; |
| 26 |
import java.util.Locale; |
27 |
import java.util.Locale; |
| 27 |
import java.util.Map; |
28 |
import java.util.Map; |
| 28 |
import java.util.MissingResourceException; |
29 |
import java.util.MissingResourceException; |
|
Lines 33-41
Link Here
|
| 33 |
|
34 |
|
| 34 |
import javax.tools.FileObject; |
35 |
import javax.tools.FileObject; |
| 35 |
import javax.tools.JavaFileObject; |
36 |
import javax.tools.JavaFileObject; |
|
|
37 |
import javax.tools.JavaFileObject.Kind; |
| 36 |
import javax.tools.StandardJavaFileManager; |
38 |
import javax.tools.StandardJavaFileManager; |
| 37 |
import javax.tools.StandardLocation; |
39 |
import javax.tools.StandardLocation; |
| 38 |
import javax.tools.JavaFileObject.Kind; |
|
|
| 39 |
|
40 |
|
| 40 |
import org.eclipse.jdt.core.compiler.IProblem; |
41 |
import org.eclipse.jdt.core.compiler.IProblem; |
| 41 |
import org.eclipse.jdt.internal.compiler.batch.FileSystem; |
42 |
import org.eclipse.jdt.internal.compiler.batch.FileSystem; |
|
Lines 67-74
Link Here
|
| 67 |
public EclipseFileManager(Locale locale, Charset charset) { |
68 |
public EclipseFileManager(Locale locale, Charset charset) { |
| 68 |
this.locale = locale == null ? Locale.getDefault() : locale; |
69 |
this.locale = locale == null ? Locale.getDefault() : locale; |
| 69 |
this.charset = charset == null ? Charset.defaultCharset() : charset; |
70 |
this.charset = charset == null ? Charset.defaultCharset() : charset; |
| 70 |
this.locations = new HashMap<String, Iterable<? extends File>>(); |
71 |
this.locations = new HashMap<>(); |
| 71 |
this.archivesCache = new HashMap<File, Archive>(); |
72 |
this.archivesCache = new HashMap<>(); |
| 72 |
try { |
73 |
try { |
| 73 |
this.setLocation(StandardLocation.PLATFORM_CLASS_PATH, getDefaultBootclasspath()); |
74 |
this.setLocation(StandardLocation.PLATFORM_CLASS_PATH, getDefaultBootclasspath()); |
| 74 |
Iterable<? extends File> defaultClasspath = getDefaultClasspath(); |
75 |
Iterable<? extends File> defaultClasspath = getDefaultClasspath(); |
|
Lines 84-138
Link Here
|
| 84 |
} |
85 |
} |
| 85 |
} |
86 |
} |
| 86 |
|
87 |
|
| 87 |
private void addFiles(File[][] jars, ArrayList<File> files) { |
|
|
| 88 |
if (jars != null) { |
| 89 |
for (File[] currentJars : jars) { |
| 90 |
if (currentJars != null) { |
| 91 |
for (File currentJar : currentJars) { |
| 92 |
if (currentJar.exists()) { |
| 93 |
files.add(currentJar); |
| 94 |
} |
| 95 |
} |
| 96 |
} |
| 97 |
} |
| 98 |
} |
| 99 |
} |
| 100 |
|
| 101 |
|
| 102 |
private void addFilesFrom(File javaHome, String propertyName, String defaultPath, ArrayList<File> files) { |
| 103 |
String extdirsStr = System.getProperty(propertyName); |
| 104 |
File[] directoriesToCheck = null; |
| 105 |
if (extdirsStr == null) { |
| 106 |
if (javaHome != null) { |
| 107 |
directoriesToCheck = new File[] { new File(javaHome, defaultPath) }; |
| 108 |
} |
| 109 |
} else { |
| 110 |
StringTokenizer tokenizer = new StringTokenizer(extdirsStr, File.pathSeparator); |
| 111 |
ArrayList<String> paths = new ArrayList<String>(); |
| 112 |
while (tokenizer.hasMoreTokens()) { |
| 113 |
paths.add(tokenizer.nextToken()); |
| 114 |
} |
| 115 |
if (paths.size() != 0) { |
| 116 |
directoriesToCheck = new File[paths.size()]; |
| 117 |
for (int i = 0; i < directoriesToCheck.length; i++) { |
| 118 |
directoriesToCheck[i] = new File(paths.get(i)); |
| 119 |
} |
| 120 |
} |
| 121 |
} |
| 122 |
if (directoriesToCheck != null) { |
| 123 |
addFiles(Main.getLibrariesFiles(directoriesToCheck), files); |
| 124 |
} |
| 125 |
|
| 126 |
} |
| 127 |
|
| 128 |
/* (non-Javadoc) |
88 |
/* (non-Javadoc) |
| 129 |
* @see javax.tools.JavaFileManager#close() |
89 |
* @see javax.tools.JavaFileManager#close() |
| 130 |
*/ |
90 |
*/ |
|
|
91 |
@Override |
| 131 |
public void close() throws IOException { |
92 |
public void close() throws IOException { |
| 132 |
this.locations = null; |
93 |
if (this.locations != null) this.locations.clear(); |
| 133 |
for (Archive archive : this.archivesCache.values()) { |
94 |
for (Archive archive : this.archivesCache.values()) { |
| 134 |
archive.close(); |
95 |
archive.close(); |
| 135 |
} |
96 |
} |
|
|
97 |
this.archivesCache.clear(); |
| 136 |
} |
98 |
} |
| 137 |
|
99 |
|
| 138 |
private void collectAllMatchingFiles(File file, String normalizedPackageName, Set<Kind> kinds, boolean recurse, ArrayList<JavaFileObject> collector) { |
100 |
private void collectAllMatchingFiles(File file, String normalizedPackageName, Set<Kind> kinds, boolean recurse, ArrayList<JavaFileObject> collector) { |
|
Lines 165-170
Link Here
|
| 165 |
} |
127 |
} |
| 166 |
} else { |
128 |
} else { |
| 167 |
Archive archive = this.getArchive(file); |
129 |
Archive archive = this.getArchive(file); |
|
|
130 |
if (archive == Archive.UNKNOWN_ARCHIVE) return; |
| 168 |
String key = normalizedPackageName; |
131 |
String key = normalizedPackageName; |
| 169 |
if (!normalizedPackageName.endsWith("/")) {//$NON-NLS-1$ |
132 |
if (!normalizedPackageName.endsWith("/")) {//$NON-NLS-1$ |
| 170 |
key += '/'; |
133 |
key += '/'; |
|
Lines 173-179
Link Here
|
| 173 |
if (recurse) { |
136 |
if (recurse) { |
| 174 |
for (String packageName : archive.allPackages()) { |
137 |
for (String packageName : archive.allPackages()) { |
| 175 |
if (packageName.startsWith(key)) { |
138 |
if (packageName.startsWith(key)) { |
| 176 |
ArrayList<String> types = archive.getTypes(packageName); |
139 |
List<String> types = archive.getTypes(packageName); |
| 177 |
if (types != null) { |
140 |
if (types != null) { |
| 178 |
for (String typeName : types) { |
141 |
for (String typeName : types) { |
| 179 |
final Kind kind = getKind(getExtension(typeName)); |
142 |
final Kind kind = getKind(getExtension(typeName)); |
|
Lines 185-196
Link Here
|
| 185 |
} |
148 |
} |
| 186 |
} |
149 |
} |
| 187 |
} else { |
150 |
} else { |
| 188 |
ArrayList<String> types = archive.getTypes(key); |
151 |
List<String> types = archive.getTypes(key); |
| 189 |
if (types != null) { |
152 |
if (types != null) { |
| 190 |
for (String typeName : types) { |
153 |
for (String typeName : types) { |
| 191 |
final Kind kind = getKind(typeName); |
154 |
final Kind kind = getKind(getExtension(typeName)); |
| 192 |
if (kinds.contains(kind)) { |
155 |
if (kinds.contains(kind)) { |
| 193 |
collector.add(archive.getArchiveFileObject(normalizedPackageName + typeName, this.charset)); |
156 |
collector.add(archive.getArchiveFileObject(key + typeName, this.charset)); |
| 194 |
} |
157 |
} |
| 195 |
} |
158 |
} |
| 196 |
} |
159 |
} |
|
Lines 199-205
Link Here
|
| 199 |
} |
162 |
} |
| 200 |
|
163 |
|
| 201 |
private Iterable<? extends File> concatFiles(Iterable<? extends File> iterable, Iterable<? extends File> iterable2) { |
164 |
private Iterable<? extends File> concatFiles(Iterable<? extends File> iterable, Iterable<? extends File> iterable2) { |
| 202 |
ArrayList<File> list = new ArrayList<File>(); |
165 |
ArrayList<File> list = new ArrayList<>(); |
| 203 |
if (iterable2 == null) return iterable; |
166 |
if (iterable2 == null) return iterable; |
| 204 |
for (Iterator<? extends File> iterator = iterable.iterator(); iterator.hasNext(); ) { |
167 |
for (Iterator<? extends File> iterator = iterable.iterator(); iterator.hasNext(); ) { |
| 205 |
list.add(iterator.next()); |
168 |
list.add(iterator.next()); |
|
Lines 213-218
Link Here
|
| 213 |
/* (non-Javadoc) |
176 |
/* (non-Javadoc) |
| 214 |
* @see javax.tools.JavaFileManager#flush() |
177 |
* @see javax.tools.JavaFileManager#flush() |
| 215 |
*/ |
178 |
*/ |
|
|
179 |
@Override |
| 216 |
public void flush() throws IOException { |
180 |
public void flush() throws IOException { |
| 217 |
for (Archive archive : this.archivesCache.values()) { |
181 |
for (Archive archive : this.archivesCache.values()) { |
| 218 |
archive.flush(); |
182 |
archive.flush(); |
|
Lines 223-228
Link Here
|
| 223 |
// check the archive (jar/zip) cache |
187 |
// check the archive (jar/zip) cache |
| 224 |
Archive archive = this.archivesCache.get(f); |
188 |
Archive archive = this.archivesCache.get(f); |
| 225 |
if (archive == null) { |
189 |
if (archive == null) { |
|
|
190 |
archive = Archive.UNKNOWN_ARCHIVE; |
| 226 |
// create a new archive |
191 |
// create a new archive |
| 227 |
if (f.exists()) { |
192 |
if (f.exists()) { |
| 228 |
try { |
193 |
try { |
|
Lines 234-245
Link Here
|
| 234 |
} |
199 |
} |
| 235 |
if (archive != null) { |
200 |
if (archive != null) { |
| 236 |
this.archivesCache.put(f, archive); |
201 |
this.archivesCache.put(f, archive); |
| 237 |
} else { |
|
|
| 238 |
this.archivesCache.put(f, Archive.UNKNOWN_ARCHIVE); |
| 239 |
} |
202 |
} |
| 240 |
} else { |
|
|
| 241 |
this.archivesCache.put(f, Archive.UNKNOWN_ARCHIVE); |
| 242 |
} |
203 |
} |
|
|
204 |
this.archivesCache.put(f, archive); |
| 243 |
} |
205 |
} |
| 244 |
return archive; |
206 |
return archive; |
| 245 |
} |
207 |
} |
|
Lines 247-259
Link Here
|
| 247 |
/* (non-Javadoc) |
209 |
/* (non-Javadoc) |
| 248 |
* @see javax.tools.JavaFileManager#getClassLoader(javax.tools.JavaFileManager.Location) |
210 |
* @see javax.tools.JavaFileManager#getClassLoader(javax.tools.JavaFileManager.Location) |
| 249 |
*/ |
211 |
*/ |
|
|
212 |
@Override |
| 250 |
public ClassLoader getClassLoader(Location location) { |
213 |
public ClassLoader getClassLoader(Location location) { |
| 251 |
Iterable<? extends File> files = getLocation(location); |
214 |
Iterable<? extends File> files = getLocation(location); |
| 252 |
if (files == null) { |
215 |
if (files == null) { |
| 253 |
// location is unknown |
216 |
// location is unknown |
| 254 |
return null; |
217 |
return null; |
| 255 |
} |
218 |
} |
| 256 |
ArrayList<URL> allURLs = new ArrayList<URL>(); |
219 |
ArrayList<URL> allURLs = new ArrayList<>(); |
| 257 |
for (File f : files) { |
220 |
for (File f : files) { |
| 258 |
try { |
221 |
try { |
| 259 |
allURLs.add(f.toURI().toURL()); |
222 |
allURLs.add(f.toURI().toURL()); |
|
Lines 267-274
Link Here
|
| 267 |
} |
230 |
} |
| 268 |
|
231 |
|
| 269 |
private Iterable<? extends File> getPathsFrom(String path) { |
232 |
private Iterable<? extends File> getPathsFrom(String path) { |
| 270 |
ArrayList<FileSystem.Classpath> paths = new ArrayList<FileSystem.Classpath>(); |
233 |
ArrayList<FileSystem.Classpath> paths = new ArrayList<>(); |
| 271 |
ArrayList<File> files = new ArrayList<File>(); |
234 |
ArrayList<File> files = new ArrayList<>(); |
| 272 |
try { |
235 |
try { |
| 273 |
this.processPathEntries(Main.DEFAULT_SIZE_CLASSPATH, paths, path, this.charset.name(), false, false); |
236 |
this.processPathEntries(Main.DEFAULT_SIZE_CLASSPATH, paths, path, this.charset.name(), false, false); |
| 274 |
} catch (IllegalArgumentException e) { |
237 |
} catch (IllegalArgumentException e) { |
|
Lines 281-287
Link Here
|
| 281 |
} |
244 |
} |
| 282 |
|
245 |
|
| 283 |
Iterable<? extends File> getDefaultBootclasspath() { |
246 |
Iterable<? extends File> getDefaultBootclasspath() { |
| 284 |
ArrayList<File> files = new ArrayList<File>(); |
247 |
List<File> files = new ArrayList<>(); |
| 285 |
String javaversion = System.getProperty("java.version");//$NON-NLS-1$ |
248 |
String javaversion = System.getProperty("java.version");//$NON-NLS-1$ |
| 286 |
if(javaversion.length() > 3) |
249 |
if(javaversion.length() > 3) |
| 287 |
javaversion = javaversion.substring(0, 3); |
250 |
javaversion = javaversion.substring(0, 3); |
|
Lines 291-322
Link Here
|
| 291 |
return null; |
254 |
return null; |
| 292 |
} |
255 |
} |
| 293 |
|
256 |
|
| 294 |
/* |
257 |
for (String fileName : org.eclipse.jdt.internal.compiler.util.Util.collectFilesNames()) { |
| 295 |
* Handle >= JDK 1.6 |
258 |
files.add(new File(fileName)); |
| 296 |
*/ |
|
|
| 297 |
String javaHome = System.getProperty("java.home"); //$NON-NLS-1$ |
| 298 |
File javaHomeFile = null; |
| 299 |
if (javaHome != null) { |
| 300 |
javaHomeFile = new File(javaHome); |
| 301 |
if (!javaHomeFile.exists()) |
| 302 |
javaHomeFile = null; |
| 303 |
} |
259 |
} |
| 304 |
|
|
|
| 305 |
addFilesFrom(javaHomeFile, "java.endorsed.dirs", "/lib/endorsed", files);//$NON-NLS-1$//$NON-NLS-2$ |
| 306 |
if (javaHomeFile != null) { |
| 307 |
File[] directoriesToCheck = null; |
| 308 |
String libs = System.getProperty("os.name").startsWith("Mac") && jdkLevel == ClassFileConstants.JDK1_6 ? "../Classes" : "lib";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
| 309 |
directoriesToCheck = new File[] { new File(javaHomeFile, libs)}; |
| 310 |
File[][] jars = Main.getLibrariesFiles(directoriesToCheck); |
| 311 |
addFiles(jars, files); |
| 312 |
} |
| 313 |
addFilesFrom(javaHomeFile, "java.ext.dirs", "/lib/ext", files);//$NON-NLS-1$//$NON-NLS-2$ |
| 314 |
return files; |
260 |
return files; |
| 315 |
} |
261 |
} |
| 316 |
|
262 |
|
| 317 |
Iterable<? extends File> getDefaultClasspath() { |
263 |
Iterable<? extends File> getDefaultClasspath() { |
| 318 |
// default classpath |
264 |
// default classpath |
| 319 |
ArrayList<File> files = new ArrayList<File>(); |
265 |
ArrayList<File> files = new ArrayList<>(); |
| 320 |
String classProp = System.getProperty("java.class.path"); //$NON-NLS-1$ |
266 |
String classProp = System.getProperty("java.class.path"); //$NON-NLS-1$ |
| 321 |
if ((classProp == null) || (classProp.length() == 0)) { |
267 |
if ((classProp == null) || (classProp.length() == 0)) { |
| 322 |
return null; |
268 |
return null; |
|
Lines 335-342
Link Here
|
| 335 |
} |
281 |
} |
| 336 |
|
282 |
|
| 337 |
private Iterable<? extends File> getEndorsedDirsFrom(String path) { |
283 |
private Iterable<? extends File> getEndorsedDirsFrom(String path) { |
| 338 |
ArrayList<FileSystem.Classpath> paths = new ArrayList<FileSystem.Classpath>(); |
284 |
ArrayList<FileSystem.Classpath> paths = new ArrayList<>(); |
| 339 |
ArrayList<File> files = new ArrayList<File>(); |
285 |
ArrayList<File> files = new ArrayList<>(); |
| 340 |
try { |
286 |
try { |
| 341 |
this.processPathEntries(Main.DEFAULT_SIZE_CLASSPATH, paths, path, this.charset.name(), false, false); |
287 |
this.processPathEntries(Main.DEFAULT_SIZE_CLASSPATH, paths, path, this.charset.name(), false, false); |
| 342 |
} catch (IllegalArgumentException e) { |
288 |
} catch (IllegalArgumentException e) { |
|
Lines 349-356
Link Here
|
| 349 |
} |
295 |
} |
| 350 |
|
296 |
|
| 351 |
private Iterable<? extends File> getExtdirsFrom(String path) { |
297 |
private Iterable<? extends File> getExtdirsFrom(String path) { |
| 352 |
ArrayList<FileSystem.Classpath> paths = new ArrayList<FileSystem.Classpath>(); |
298 |
ArrayList<FileSystem.Classpath> paths = new ArrayList<>(); |
| 353 |
ArrayList<File> files = new ArrayList<File>(); |
299 |
ArrayList<File> files = new ArrayList<>(); |
| 354 |
try { |
300 |
try { |
| 355 |
this.processPathEntries(Main.DEFAULT_SIZE_CLASSPATH, paths, path, this.charset.name(), false, false); |
301 |
this.processPathEntries(Main.DEFAULT_SIZE_CLASSPATH, paths, path, this.charset.name(), false, false); |
| 356 |
} catch (IllegalArgumentException e) { |
302 |
} catch (IllegalArgumentException e) { |
|
Lines 377-382
Link Here
|
| 377 |
/* (non-Javadoc) |
323 |
/* (non-Javadoc) |
| 378 |
* @see javax.tools.JavaFileManager#getFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String) |
324 |
* @see javax.tools.JavaFileManager#getFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String) |
| 379 |
*/ |
325 |
*/ |
|
|
326 |
@Override |
| 380 |
public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException { |
327 |
public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException { |
| 381 |
Iterable<? extends File> files = getLocation(location); |
328 |
Iterable<? extends File> files = getLocation(location); |
| 382 |
if (files == null) { |
329 |
if (files == null) { |
|
Lines 408-413
Link Here
|
| 408 |
/* (non-Javadoc) |
355 |
/* (non-Javadoc) |
| 409 |
* @see javax.tools.JavaFileManager#getFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String, javax.tools.FileObject) |
356 |
* @see javax.tools.JavaFileManager#getFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String, javax.tools.FileObject) |
| 410 |
*/ |
357 |
*/ |
|
|
358 |
@Override |
| 411 |
public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) |
359 |
public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) |
| 412 |
throws IOException { |
360 |
throws IOException { |
| 413 |
Iterable<? extends File> files = getLocation(location); |
361 |
Iterable<? extends File> files = getLocation(location); |
|
Lines 428-433
Link Here
|
| 428 |
/* (non-Javadoc) |
376 |
/* (non-Javadoc) |
| 429 |
* @see javax.tools.JavaFileManager#getJavaFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind) |
377 |
* @see javax.tools.JavaFileManager#getJavaFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind) |
| 430 |
*/ |
378 |
*/ |
|
|
379 |
@Override |
| 431 |
public JavaFileObject getJavaFileForInput(Location location, String className, Kind kind) throws IOException { |
380 |
public JavaFileObject getJavaFileForInput(Location location, String className, Kind kind) throws IOException { |
| 432 |
if (kind != Kind.CLASS && kind != Kind.SOURCE) { |
381 |
if (kind != Kind.CLASS && kind != Kind.SOURCE) { |
| 433 |
throw new IllegalArgumentException("Invalid kind : " + kind);//$NON-NLS-1$ |
382 |
throw new IllegalArgumentException("Invalid kind : " + kind);//$NON-NLS-1$ |
|
Lines 463-468
Link Here
|
| 463 |
/* (non-Javadoc) |
412 |
/* (non-Javadoc) |
| 464 |
* @see javax.tools.JavaFileManager#getJavaFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind, javax.tools.FileObject) |
413 |
* @see javax.tools.JavaFileManager#getJavaFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind, javax.tools.FileObject) |
| 465 |
*/ |
414 |
*/ |
|
|
415 |
@Override |
| 466 |
public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) |
416 |
public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) |
| 467 |
throws IOException { |
417 |
throws IOException { |
| 468 |
if (kind != Kind.CLASS && kind != Kind.SOURCE) { |
418 |
if (kind != Kind.CLASS && kind != Kind.SOURCE) { |
|
Lines 517-522
Link Here
|
| 517 |
/* (non-Javadoc) |
467 |
/* (non-Javadoc) |
| 518 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjects(java.io.File[]) |
468 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjects(java.io.File[]) |
| 519 |
*/ |
469 |
*/ |
|
|
470 |
@Override |
| 520 |
public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) { |
471 |
public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) { |
| 521 |
return getJavaFileObjectsFromFiles(Arrays.asList(files)); |
472 |
return getJavaFileObjectsFromFiles(Arrays.asList(files)); |
| 522 |
} |
473 |
} |
|
Lines 524-529
Link Here
|
| 524 |
/* (non-Javadoc) |
475 |
/* (non-Javadoc) |
| 525 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjects(java.lang.String[]) |
476 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjects(java.lang.String[]) |
| 526 |
*/ |
477 |
*/ |
|
|
478 |
@Override |
| 527 |
public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) { |
479 |
public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) { |
| 528 |
return getJavaFileObjectsFromStrings(Arrays.asList(names)); |
480 |
return getJavaFileObjectsFromStrings(Arrays.asList(names)); |
| 529 |
} |
481 |
} |
|
Lines 531-538
Link Here
|
| 531 |
/* (non-Javadoc) |
483 |
/* (non-Javadoc) |
| 532 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjectsFromFiles(java.lang.Iterable) |
484 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjectsFromFiles(java.lang.Iterable) |
| 533 |
*/ |
485 |
*/ |
|
|
486 |
@Override |
| 534 |
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) { |
487 |
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) { |
| 535 |
ArrayList<JavaFileObject> javaFileArrayList = new ArrayList<JavaFileObject>(); |
488 |
ArrayList<JavaFileObject> javaFileArrayList = new ArrayList<>(); |
| 536 |
for (File f : files) { |
489 |
for (File f : files) { |
| 537 |
if (f.isDirectory()) { |
490 |
if (f.isDirectory()) { |
| 538 |
throw new IllegalArgumentException("file : " + f.getAbsolutePath() + " is a directory"); //$NON-NLS-1$ //$NON-NLS-2$ |
491 |
throw new IllegalArgumentException("file : " + f.getAbsolutePath() + " is a directory"); //$NON-NLS-1$ //$NON-NLS-2$ |
|
Lines 545-552
Link Here
|
| 545 |
/* (non-Javadoc) |
498 |
/* (non-Javadoc) |
| 546 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjectsFromStrings(java.lang.Iterable) |
499 |
* @see javax.tools.StandardJavaFileManager#getJavaFileObjectsFromStrings(java.lang.Iterable) |
| 547 |
*/ |
500 |
*/ |
|
|
501 |
@Override |
| 548 |
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) { |
502 |
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) { |
| 549 |
ArrayList<File> files = new ArrayList<File>(); |
503 |
ArrayList<File> files = new ArrayList<>(); |
| 550 |
for (String name : names) { |
504 |
for (String name : names) { |
| 551 |
files.add(new File(name)); |
505 |
files.add(new File(name)); |
| 552 |
} |
506 |
} |
|
Lines 571-576
Link Here
|
| 571 |
/* (non-Javadoc) |
525 |
/* (non-Javadoc) |
| 572 |
* @see javax.tools.StandardJavaFileManager#getLocation(javax.tools.JavaFileManager.Location) |
526 |
* @see javax.tools.StandardJavaFileManager#getLocation(javax.tools.JavaFileManager.Location) |
| 573 |
*/ |
527 |
*/ |
|
|
528 |
@Override |
| 574 |
public Iterable<? extends File> getLocation(Location location) { |
529 |
public Iterable<? extends File> getLocation(Location location) { |
| 575 |
if (this.locations == null) return null; |
530 |
if (this.locations == null) return null; |
| 576 |
return this.locations.get(location.getName()); |
531 |
return this.locations.get(location.getName()); |
|
Lines 584-590
Link Here
|
| 584 |
if (file.exists() && !file.isDirectory()) { |
539 |
if (file.exists() && !file.isDirectory()) { |
| 585 |
throw new IllegalArgumentException("file : " + file.getAbsolutePath() + " is not a directory");//$NON-NLS-1$//$NON-NLS-2$ |
540 |
throw new IllegalArgumentException("file : " + file.getAbsolutePath() + " is not a directory");//$NON-NLS-1$//$NON-NLS-2$ |
| 586 |
} |
541 |
} |
| 587 |
ArrayList<File> list = new ArrayList<File>(1); |
542 |
ArrayList<File> list = new ArrayList<>(1); |
| 588 |
list.add(file); |
543 |
list.add(file); |
| 589 |
return list; |
544 |
return list; |
| 590 |
} |
545 |
} |
|
Lines 592-610
Link Here
|
| 592 |
/* (non-Javadoc) |
547 |
/* (non-Javadoc) |
| 593 |
* @see javax.tools.JavaFileManager#handleOption(java.lang.String, java.util.Iterator) |
548 |
* @see javax.tools.JavaFileManager#handleOption(java.lang.String, java.util.Iterator) |
| 594 |
*/ |
549 |
*/ |
|
|
550 |
@Override |
| 595 |
public boolean handleOption(String current, Iterator<String> remaining) { |
551 |
public boolean handleOption(String current, Iterator<String> remaining) { |
| 596 |
try { |
552 |
try { |
| 597 |
if ("-bootclasspath".equals(current)) {//$NON-NLS-1$ |
553 |
if ("-bootclasspath".equals(current)) {//$NON-NLS-1$ |
| 598 |
remaining.remove(); // remove the current option |
|
|
| 599 |
if (remaining.hasNext()) { |
554 |
if (remaining.hasNext()) { |
| 600 |
final Iterable<? extends File> bootclasspaths = getPathsFrom(remaining.next()); |
555 |
final Iterable<? extends File> bootclasspaths = getPathsFrom(remaining.next()); |
| 601 |
if (bootclasspaths != null) { |
556 |
if (bootclasspaths != null) { |
| 602 |
Iterable<? extends File> iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); |
557 |
Iterable<? extends File> iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); |
| 603 |
if ((this.flags & HAS_ENDORSED_DIRS) == 0 |
558 |
if ((this.flags & EclipseFileManager.HAS_ENDORSED_DIRS) == 0 |
| 604 |
&& (this.flags & HAS_EXT_DIRS) == 0) { |
559 |
&& (this.flags & EclipseFileManager.HAS_EXT_DIRS) == 0) { |
| 605 |
// override default bootclasspath |
560 |
// override default bootclasspath |
| 606 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootclasspaths); |
561 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootclasspaths); |
| 607 |
} else if ((this.flags & HAS_ENDORSED_DIRS) != 0) { |
562 |
} else if ((this.flags & EclipseFileManager.HAS_ENDORSED_DIRS) != 0) { |
| 608 |
// endorseddirs have been processed first |
563 |
// endorseddirs have been processed first |
| 609 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, |
564 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, |
| 610 |
concatFiles(iterable, bootclasspaths)); |
565 |
concatFiles(iterable, bootclasspaths)); |
|
Lines 614-628
Link Here
|
| 614 |
prependFiles(iterable, bootclasspaths)); |
569 |
prependFiles(iterable, bootclasspaths)); |
| 615 |
} |
570 |
} |
| 616 |
} |
571 |
} |
| 617 |
remaining.remove(); |
572 |
this.flags |= EclipseFileManager.HAS_BOOTCLASSPATH; |
| 618 |
this.flags |= HAS_BOOTCLASSPATH; |
|
|
| 619 |
return true; |
573 |
return true; |
| 620 |
} else { |
574 |
} else { |
| 621 |
throw new IllegalArgumentException(); |
575 |
throw new IllegalArgumentException(); |
| 622 |
} |
576 |
} |
| 623 |
} |
577 |
} |
| 624 |
if ("-classpath".equals(current) || "-cp".equals(current)) {//$NON-NLS-1$//$NON-NLS-2$ |
578 |
if ("-classpath".equals(current) || "-cp".equals(current)) {//$NON-NLS-1$//$NON-NLS-2$ |
| 625 |
remaining.remove(); // remove the current option |
|
|
| 626 |
if (remaining.hasNext()) { |
579 |
if (remaining.hasNext()) { |
| 627 |
final Iterable<? extends File> classpaths = getPathsFrom(remaining.next()); |
580 |
final Iterable<? extends File> classpaths = getPathsFrom(remaining.next()); |
| 628 |
if (classpaths != null) { |
581 |
if (classpaths != null) { |
|
Lines 633-730
Link Here
|
| 633 |
} else { |
586 |
} else { |
| 634 |
setLocation(StandardLocation.CLASS_PATH, classpaths); |
587 |
setLocation(StandardLocation.CLASS_PATH, classpaths); |
| 635 |
} |
588 |
} |
| 636 |
if ((this.flags & HAS_PROCESSORPATH) == 0) { |
589 |
if ((this.flags & EclipseFileManager.HAS_PROCESSORPATH) == 0) { |
| 637 |
setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, classpaths); |
590 |
setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, classpaths); |
| 638 |
} |
591 |
} |
| 639 |
} |
592 |
} |
| 640 |
remaining.remove(); |
|
|
| 641 |
return true; |
593 |
return true; |
| 642 |
} else { |
594 |
} else { |
| 643 |
throw new IllegalArgumentException(); |
595 |
throw new IllegalArgumentException(); |
| 644 |
} |
596 |
} |
| 645 |
} |
597 |
} |
| 646 |
if ("-encoding".equals(current)) {//$NON-NLS-1$ |
598 |
if ("-encoding".equals(current)) {//$NON-NLS-1$ |
| 647 |
remaining.remove(); // remove the current option |
|
|
| 648 |
if (remaining.hasNext()) { |
599 |
if (remaining.hasNext()) { |
| 649 |
this.charset = Charset.forName(remaining.next()); |
600 |
this.charset = Charset.forName(remaining.next()); |
| 650 |
remaining.remove(); |
|
|
| 651 |
return true; |
601 |
return true; |
| 652 |
} else { |
602 |
} else { |
| 653 |
throw new IllegalArgumentException(); |
603 |
throw new IllegalArgumentException(); |
| 654 |
} |
604 |
} |
| 655 |
} |
605 |
} |
| 656 |
if ("-sourcepath".equals(current)) {//$NON-NLS-1$ |
606 |
if ("-sourcepath".equals(current)) {//$NON-NLS-1$ |
| 657 |
remaining.remove(); // remove the current option |
|
|
| 658 |
if (remaining.hasNext()) { |
607 |
if (remaining.hasNext()) { |
| 659 |
final Iterable<? extends File> sourcepaths = getPathsFrom(remaining.next()); |
608 |
final Iterable<? extends File> sourcepaths = getPathsFrom(remaining.next()); |
| 660 |
if (sourcepaths != null) setLocation(StandardLocation.SOURCE_PATH, sourcepaths); |
609 |
if (sourcepaths != null) setLocation(StandardLocation.SOURCE_PATH, sourcepaths); |
| 661 |
remaining.remove(); |
|
|
| 662 |
return true; |
610 |
return true; |
| 663 |
} else { |
611 |
} else { |
| 664 |
throw new IllegalArgumentException(); |
612 |
throw new IllegalArgumentException(); |
| 665 |
} |
613 |
} |
| 666 |
} |
614 |
} |
| 667 |
if ("-extdirs".equals(current)) {//$NON-NLS-1$ |
615 |
if ("-extdirs".equals(current)) {//$NON-NLS-1$ |
| 668 |
remaining.remove(); // remove the current option |
|
|
| 669 |
if (remaining.hasNext()) { |
616 |
if (remaining.hasNext()) { |
| 670 |
Iterable<? extends File> iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); |
617 |
Iterable<? extends File> iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); |
| 671 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, |
618 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, |
| 672 |
concatFiles(iterable, getExtdirsFrom(remaining.next()))); |
619 |
concatFiles(iterable, getExtdirsFrom(remaining.next()))); |
| 673 |
remaining.remove(); |
620 |
this.flags |= EclipseFileManager.HAS_EXT_DIRS; |
| 674 |
this.flags |= HAS_EXT_DIRS; |
|
|
| 675 |
return true; |
621 |
return true; |
| 676 |
} else { |
622 |
} else { |
| 677 |
throw new IllegalArgumentException(); |
623 |
throw new IllegalArgumentException(); |
| 678 |
} |
624 |
} |
| 679 |
} |
625 |
} |
| 680 |
if ("-endorseddirs".equals(current)) {//$NON-NLS-1$ |
626 |
if ("-endorseddirs".equals(current)) {//$NON-NLS-1$ |
| 681 |
remaining.remove(); // remove the current option |
|
|
| 682 |
if (remaining.hasNext()) { |
627 |
if (remaining.hasNext()) { |
| 683 |
Iterable<? extends File> iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); |
628 |
Iterable<? extends File> iterable = getLocation(StandardLocation.PLATFORM_CLASS_PATH); |
| 684 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, |
629 |
setLocation(StandardLocation.PLATFORM_CLASS_PATH, |
| 685 |
prependFiles(iterable, getEndorsedDirsFrom(remaining.next()))); |
630 |
prependFiles(iterable, getEndorsedDirsFrom(remaining.next()))); |
| 686 |
remaining.remove(); |
631 |
this.flags |= EclipseFileManager.HAS_ENDORSED_DIRS; |
| 687 |
this.flags |= HAS_ENDORSED_DIRS; |
|
|
| 688 |
return true; |
632 |
return true; |
| 689 |
} else { |
633 |
} else { |
| 690 |
throw new IllegalArgumentException(); |
634 |
throw new IllegalArgumentException(); |
| 691 |
} |
635 |
} |
| 692 |
} |
636 |
} |
| 693 |
if ("-d".equals(current)) { //$NON-NLS-1$ |
637 |
if ("-d".equals(current)) { //$NON-NLS-1$ |
| 694 |
remaining.remove(); // remove the current option |
|
|
| 695 |
if (remaining.hasNext()) { |
638 |
if (remaining.hasNext()) { |
| 696 |
final Iterable<? extends File> outputDir = getOutputDir(remaining.next()); |
639 |
final Iterable<? extends File> outputDir = getOutputDir(remaining.next()); |
| 697 |
if (outputDir != null) { |
640 |
if (outputDir != null) { |
| 698 |
setLocation(StandardLocation.CLASS_OUTPUT, outputDir); |
641 |
setLocation(StandardLocation.CLASS_OUTPUT, outputDir); |
| 699 |
} |
642 |
} |
| 700 |
remaining.remove(); |
|
|
| 701 |
return true; |
643 |
return true; |
| 702 |
} else { |
644 |
} else { |
| 703 |
throw new IllegalArgumentException(); |
645 |
throw new IllegalArgumentException(); |
| 704 |
} |
646 |
} |
| 705 |
} |
647 |
} |
| 706 |
if ("-s".equals(current)) { //$NON-NLS-1$ |
648 |
if ("-s".equals(current)) { //$NON-NLS-1$ |
| 707 |
remaining.remove(); // remove the current option |
|
|
| 708 |
if (remaining.hasNext()) { |
649 |
if (remaining.hasNext()) { |
| 709 |
final Iterable<? extends File> outputDir = getOutputDir(remaining.next()); |
650 |
final Iterable<? extends File> outputDir = getOutputDir(remaining.next()); |
| 710 |
if (outputDir != null) { |
651 |
if (outputDir != null) { |
| 711 |
setLocation(StandardLocation.SOURCE_OUTPUT, outputDir); |
652 |
setLocation(StandardLocation.SOURCE_OUTPUT, outputDir); |
| 712 |
} |
653 |
} |
| 713 |
remaining.remove(); |
|
|
| 714 |
return true; |
654 |
return true; |
| 715 |
} else { |
655 |
} else { |
| 716 |
throw new IllegalArgumentException(); |
656 |
throw new IllegalArgumentException(); |
| 717 |
} |
657 |
} |
| 718 |
} |
658 |
} |
| 719 |
if ("-processorpath".equals(current)) {//$NON-NLS-1$ |
659 |
if ("-processorpath".equals(current)) {//$NON-NLS-1$ |
| 720 |
remaining.remove(); // remove the current option |
|
|
| 721 |
if (remaining.hasNext()) { |
660 |
if (remaining.hasNext()) { |
| 722 |
final Iterable<? extends File> processorpaths = getPathsFrom(remaining.next()); |
661 |
final Iterable<? extends File> processorpaths = getPathsFrom(remaining.next()); |
| 723 |
if (processorpaths != null) { |
662 |
if (processorpaths != null) { |
| 724 |
setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, processorpaths); |
663 |
setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, processorpaths); |
| 725 |
} |
664 |
} |
| 726 |
remaining.remove(); |
665 |
this.flags |= EclipseFileManager.HAS_PROCESSORPATH; |
| 727 |
this.flags |= HAS_PROCESSORPATH; |
|
|
| 728 |
return true; |
666 |
return true; |
| 729 |
} else { |
667 |
} else { |
| 730 |
throw new IllegalArgumentException(); |
668 |
throw new IllegalArgumentException(); |
|
Lines 739-744
Link Here
|
| 739 |
/* (non-Javadoc) |
677 |
/* (non-Javadoc) |
| 740 |
* @see javax.tools.JavaFileManager#hasLocation(javax.tools.JavaFileManager.Location) |
678 |
* @see javax.tools.JavaFileManager#hasLocation(javax.tools.JavaFileManager.Location) |
| 741 |
*/ |
679 |
*/ |
|
|
680 |
@Override |
| 742 |
public boolean hasLocation(Location location) { |
681 |
public boolean hasLocation(Location location) { |
| 743 |
return this.locations != null && this.locations.containsKey(location.getName()); |
682 |
return this.locations != null && this.locations.containsKey(location.getName()); |
| 744 |
} |
683 |
} |
|
Lines 746-751
Link Here
|
| 746 |
/* (non-Javadoc) |
685 |
/* (non-Javadoc) |
| 747 |
* @see javax.tools.JavaFileManager#inferBinaryName(javax.tools.JavaFileManager.Location, javax.tools.JavaFileObject) |
686 |
* @see javax.tools.JavaFileManager#inferBinaryName(javax.tools.JavaFileManager.Location, javax.tools.JavaFileObject) |
| 748 |
*/ |
687 |
*/ |
|
|
688 |
@Override |
| 749 |
public String inferBinaryName(Location location, JavaFileObject file) { |
689 |
public String inferBinaryName(Location location, JavaFileObject file) { |
| 750 |
String name = file.getName(); |
690 |
String name = file.getName(); |
| 751 |
JavaFileObject javaFileObject = null; |
691 |
JavaFileObject javaFileObject = null; |
|
Lines 763-769
Link Here
|
| 763 |
if (javaFileObject == null) { |
703 |
if (javaFileObject == null) { |
| 764 |
return null; |
704 |
return null; |
| 765 |
} |
705 |
} |
| 766 |
return normalized(name); |
706 |
return name.replace('/', '.'); |
| 767 |
} |
707 |
} |
| 768 |
|
708 |
|
| 769 |
private boolean isArchive(File f) { |
709 |
private boolean isArchive(File f) { |
|
Lines 774-779
Link Here
|
| 774 |
/* (non-Javadoc) |
714 |
/* (non-Javadoc) |
| 775 |
* @see javax.tools.StandardJavaFileManager#isSameFile(javax.tools.FileObject, javax.tools.FileObject) |
715 |
* @see javax.tools.StandardJavaFileManager#isSameFile(javax.tools.FileObject, javax.tools.FileObject) |
| 776 |
*/ |
716 |
*/ |
|
|
717 |
@Override |
| 777 |
public boolean isSameFile(FileObject fileObject1, FileObject fileObject2) { |
718 |
public boolean isSameFile(FileObject fileObject1, FileObject fileObject2) { |
| 778 |
// EclipseFileManager creates only EcliseFileObject |
719 |
// EclipseFileManager creates only EcliseFileObject |
| 779 |
if (!(fileObject1 instanceof EclipseFileObject)) throw new IllegalArgumentException("Unsupported file object class : " + fileObject1.getClass());//$NON-NLS-1$ |
720 |
if (!(fileObject1 instanceof EclipseFileObject)) throw new IllegalArgumentException("Unsupported file object class : " + fileObject1.getClass());//$NON-NLS-1$ |
|
Lines 783-788
Link Here
|
| 783 |
/* (non-Javadoc) |
724 |
/* (non-Javadoc) |
| 784 |
* @see javax.tools.OptionChecker#isSupportedOption(java.lang.String) |
725 |
* @see javax.tools.OptionChecker#isSupportedOption(java.lang.String) |
| 785 |
*/ |
726 |
*/ |
|
|
727 |
@Override |
| 786 |
public int isSupportedOption(String option) { |
728 |
public int isSupportedOption(String option) { |
| 787 |
return Options.processOptionsFileManager(option); |
729 |
return Options.processOptionsFileManager(option); |
| 788 |
} |
730 |
} |
|
Lines 790-795
Link Here
|
| 790 |
/* (non-Javadoc) |
732 |
/* (non-Javadoc) |
| 791 |
* @see javax.tools.JavaFileManager#list(javax.tools.JavaFileManager.Location, java.lang.String, java.util.Set, boolean) |
733 |
* @see javax.tools.JavaFileManager#list(javax.tools.JavaFileManager.Location, java.lang.String, java.util.Set, boolean) |
| 792 |
*/ |
734 |
*/ |
|
|
735 |
@Override |
| 793 |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<Kind> kinds, boolean recurse) |
736 |
public Iterable<JavaFileObject> list(Location location, String packageName, Set<Kind> kinds, boolean recurse) |
| 794 |
throws IOException { |
737 |
throws IOException { |
| 795 |
|
738 |
|
|
Lines 798-804
Link Here
|
| 798 |
throw new IllegalArgumentException("Unknown location : " + location);//$NON-NLS-1$ |
741 |
throw new IllegalArgumentException("Unknown location : " + location);//$NON-NLS-1$ |
| 799 |
} |
742 |
} |
| 800 |
|
743 |
|
| 801 |
ArrayList<JavaFileObject> collector = new ArrayList<JavaFileObject>(); |
744 |
ArrayList<JavaFileObject> collector = new ArrayList<>(); |
| 802 |
String normalizedPackageName = normalized(packageName); |
745 |
String normalizedPackageName = normalized(packageName); |
| 803 |
for (File file : allFilesInLocations) { |
746 |
for (File file : allFilesInLocations) { |
| 804 |
collectAllMatchingFiles(file, normalizedPackageName, kinds, recurse, collector); |
747 |
collectAllMatchingFiles(file, normalizedPackageName, kinds, recurse, collector); |
|
Lines 823-829
Link Here
|
| 823 |
private Iterable<? extends File> prependFiles(Iterable<? extends File> iterable, |
766 |
private Iterable<? extends File> prependFiles(Iterable<? extends File> iterable, |
| 824 |
Iterable<? extends File> iterable2) { |
767 |
Iterable<? extends File> iterable2) { |
| 825 |
if (iterable2 == null) return iterable; |
768 |
if (iterable2 == null) return iterable; |
| 826 |
ArrayList<File> list = new ArrayList<File>(); |
769 |
ArrayList<File> list = new ArrayList<>(); |
| 827 |
for (Iterator<? extends File> iterator = iterable2.iterator(); iterator.hasNext(); ) { |
770 |
for (Iterator<? extends File> iterator = iterable2.iterator(); iterator.hasNext(); ) { |
| 828 |
list.add(iterator.next()); |
771 |
list.add(iterator.next()); |
| 829 |
} |
772 |
} |
|
Lines 836-841
Link Here
|
| 836 |
/* (non-Javadoc) |
779 |
/* (non-Javadoc) |
| 837 |
* @see javax.tools.StandardJavaFileManager#setLocation(javax.tools.JavaFileManager.Location, java.lang.Iterable) |
780 |
* @see javax.tools.StandardJavaFileManager#setLocation(javax.tools.JavaFileManager.Location, java.lang.Iterable) |
| 838 |
*/ |
781 |
*/ |
|
|
782 |
@Override |
| 839 |
public void setLocation(Location location, Iterable<? extends File> path) throws IOException { |
783 |
public void setLocation(Location location, Iterable<? extends File> path) throws IOException { |
| 840 |
if (path != null) { |
784 |
if (path != null) { |
| 841 |
if (location.isOutputLocation()) { |
785 |
if (location.isOutputLocation()) { |
|
Lines 863-869
Link Here
|
| 863 |
} |
807 |
} |
| 864 |
} |
808 |
} |
| 865 |
|
809 |
|
| 866 |
@SuppressWarnings({"rawtypes", "unchecked"}) |
810 |
@SuppressWarnings({"unchecked", "rawtypes"}) |
| 867 |
public void processPathEntries(final int defaultSize, final ArrayList paths, |
811 |
public void processPathEntries(final int defaultSize, final ArrayList paths, |
| 868 |
final String currentPath, String customEncoding, boolean isSourceOnly, |
812 |
final String currentPath, String customEncoding, boolean isSourceOnly, |
| 869 |
boolean rejectDestinationPathOnJars) { |
813 |
boolean rejectDestinationPathOnJars) { |