Browse Source

Throw an exception for missing manifests - as advertized in the

javadocs.

PR: 19492
Submitted by:	Nikolaus Schmitt <n dot schmitt at scaet dot de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275483 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
9402248914
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java

+ 5
- 1
src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java View File

@@ -238,7 +238,11 @@ public class ExtensionUtil {
throws BuildException {
try {
final JarFile jarFile = new JarFile(file);
return jarFile.getManifest();
Manifest m = jarFile.getManifest();
if (m == null) {
throw new BuildException(file + " doesn't have a MANIFEST");
}
return m;
} catch (final IOException ioe) {
throw new BuildException(ioe.getMessage(), ioe);
}


Loading…
Cancel
Save