This commit is contained in:
Phillip Webb 2013-10-17 14:12:42 -07:00
parent 43f8a71af4
commit 5c6dd52e9a
3 changed files with 12 additions and 13 deletions

View File

@ -419,8 +419,6 @@ public class PropertiesLauncher extends Launcher {
/**
* Convenience class for finding nested archives (archive entries that can be
* classpath entries).
*
* @author Dave Syer
*/
private static final class ArchiveEntryFilter implements EntryFilter {
@Override
@ -433,8 +431,6 @@ public class PropertiesLauncher extends Launcher {
/**
* Convenience class for finding nested archives that have a prefix in their file path
* (e.g. "lib/").
*
* @author Dave Syer
*/
private static final class PrefixMatchingArchiveFilter implements EntryFilter {
private final String prefix;

View File

@ -53,19 +53,22 @@ public abstract class Archive {
mainClass = manifest.getMainAttributes().getValue("Start-Class");
}
if (mainClass == null) {
String url = "UNKNOWN";
try {
url = getUrl().toString();
}
catch (Exception e) {
// ignore
}
throw new IllegalStateException(
"No 'Start-Class' manifest entry specified in " + url);
"No 'Start-Class' manifest entry specified in " + this);
}
return mainClass;
}
@Override
public String toString() {
try {
return getUrl().toString();
}
catch (Exception e) {
return "archive";
}
}
/**
* Returns the manifest of the archive.
* @return the manifest

View File

@ -71,4 +71,4 @@ public class FileEncodingApplicationContextInitializer implements
}
}
}
};
};