ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/extension ExtensionUtil.java
Date Tue, 14 Oct 2003 12:26:27 GMT
bodewig     2003/10/14 05:26:27

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/extension
                        ExtensionUtil.java
  Log:
  Throw an exception for missing manifests - as advertized in the
  javadocs.
  
  PR: 19492
  Submitted by:	Nikolaus Schmitt <n dot schmitt at scaet dot de>
  
  Revision  Changes    Path
  1.5       +6 -2      ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java
  
  Index: ExtensionUtil.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExtensionUtil.java	9 Jul 2003 11:24:31 -0000	1.4
  +++ ExtensionUtil.java	14 Oct 2003 12:26:27 -0000	1.5
  @@ -238,7 +238,11 @@
           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);
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message