ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util CollectionUtils.java
Date Thu, 04 Jul 2002 15:35:12 GMT
bodewig     2002/07/04 08:35:12

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Jar.java
               src/main/org/apache/tools/ant/util Tag: ANT_15_BRANCH
                        CollectionUtils.java
  Log:
  Fix NPE in <jar> reported by Lee Miles on ant-user.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.51.2.9  +7 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.51.2.8
  retrieving revision 1.51.2.9
  diff -u -r1.51.2.8 -r1.51.2.9
  --- Jar.java	22 Jun 2002 23:40:22 -0000	1.51.2.8
  +++ Jar.java	4 Jul 2002 15:35:11 -0000	1.51.2.9
  @@ -437,7 +437,13 @@
                   Project.MSG_VERBOSE);
   
               try {
  -                Manifest newManifest = getManifest(new InputStreamReader(is));
  +                Manifest newManifest = null;
  +                if (is != null) {
  +                    newManifest = getManifest(new InputStreamReader(is));
  +                } else {
  +                    newManifest = getManifest(file);
  +                }
  +
                   if (filesetManifest == null) {
                       filesetManifest = newManifest;
                   } else {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +1 -1      jakarta-ant/src/main/org/apache/tools/ant/util/CollectionUtils.java
  
  Index: CollectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/CollectionUtils.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- CollectionUtils.java	4 Jul 2002 15:04:07 -0000	1.1.2.2
  +++ CollectionUtils.java	4 Jul 2002 15:35:11 -0000	1.1.2.3
  @@ -92,7 +92,7 @@
               }
           }
           
  -        // don't need to check e2.hasMoreElements as the Vectors
  +        // don't need to check e2.hasMoreElements as the Vectors have
           // same size.
   
           return true;
  
  
  

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


Mime
View raw message