maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject cvs commit: maven-components/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources ResourcesMojo.java
Date Mon, 06 Dec 2004 10:47:39 GMT
evenisse    2004/12/06 02:47:39

  Modified:    maven-core-it-verifier/src/main/java/org/apache/maven/it
                        Verifier.java
               maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources
                        ResourcesMojo.java
  Log:
  Close some streams.
  
  Revision  Changes    Path
  1.18      +5 -1      maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java
  
  Index: Verifier.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Verifier.java	5 Dec 2004 04:11:07 -0000	1.17
  +++ Verifier.java	6 Dec 2004 10:47:39 -0000	1.18
  @@ -124,6 +124,8 @@
   
                   lines.add( line );
               }
  +
  +            reader.close();
           }
           catch ( Exception e )
           {
  @@ -245,6 +247,8 @@
                   {
                       throw new VerificationException( "Expected JAR resource was not found:
" + line );
                   }
  +
  +                is.close();
               }
               catch ( Exception e )
               {
  
  
  
  1.11      +6 -2      maven-components/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
  
  Index: ResourcesMojo.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ResourcesMojo.java	3 Nov 2004 03:43:31 -0000	1.10
  +++ ResourcesMojo.java	6 Dec 2004 10:47:39 -0000	1.11
  @@ -184,7 +184,11 @@
   
           in.close();
   
  -        return buffer.toByteArray();
  +        byte[] content = buffer.toByteArray();
  +
  +        buffer.close();
  +
  +        return content;
       }
   
       public static void fileWrite( String fileName, byte[] data ) throws Exception
  
  
  

Mime
View raw message