Merge branch '1.5.x'
This commit is contained in:
commit
fb79684ddd
|
|
@ -140,6 +140,7 @@ final class ChangeableUrls implements Iterable<URL> {
|
|||
String[] entries = StringUtils.delimitedListToStringArray(classPath, " ");
|
||||
List<URL> urls = new ArrayList<>(entries.length);
|
||||
File parent = new File(jarFile.getName()).getParentFile();
|
||||
List<File> nonExistentEntries = new ArrayList<>();
|
||||
for (String entry : entries) {
|
||||
try {
|
||||
File referenced = new File(parent, entry);
|
||||
|
|
@ -147,9 +148,7 @@ final class ChangeableUrls implements Iterable<URL> {
|
|||
urls.add(referenced.toURI().toURL());
|
||||
}
|
||||
else {
|
||||
System.out.println("Ignoring Class-Path entry " + entry + " found in "
|
||||
+ jarFile.getName() + " as " + referenced
|
||||
+ " does not exist");
|
||||
nonExistentEntries.add(referenced);
|
||||
}
|
||||
}
|
||||
catch (MalformedURLException ex) {
|
||||
|
|
@ -157,6 +156,11 @@ final class ChangeableUrls implements Iterable<URL> {
|
|||
"Class-Path attribute contains malformed URL", ex);
|
||||
}
|
||||
}
|
||||
if (!nonExistentEntries.isEmpty()) {
|
||||
System.out.println("The Class-Path manifest attribute in " + jarFile.getName()
|
||||
+ " referenced one or more files that do not exist: "
|
||||
+ StringUtils.collectionToCommaDelimitedString(nonExistentEntries));
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue