You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2003/12/29 04:28:53 UTC

cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io/testtools FileBasedTestCase.java

bayard      2003/12/28 19:28:53

  Modified:    io/src/java/org/apache/commons/io FileUtils.java
                        IOUtils.java
               io/src/test/org/apache/commons/io/testtools
                        FileBasedTestCase.java
  Log:
  Renamed shutdownXxx methods to closeQuietly(Xxx).
  
  Revision  Changes    Path
  1.21      +9 -9      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java
  
  Index: FileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FileUtils.java	25 Dec 2003 11:05:59 -0000	1.20
  +++ FileUtils.java	29 Dec 2003 03:28:53 -0000	1.21
  @@ -322,8 +322,8 @@
               return IOUtils.contentEquals(input1, input2);
   
           } finally {
  -            IOUtils.shutdownStream(input1);
  -            IOUtils.shutdownStream(input2);
  +            IOUtils.closeQuietly(input1);
  +            IOUtils.closeQuietly(input2);
           }
       }
   
  @@ -429,10 +429,10 @@
               try {
                   CopyUtils.copy(input, output);
               } finally {
  -                IOUtils.shutdownStream(output);
  +                IOUtils.closeQuietly(output);
               }
           } finally {
  -            IOUtils.shutdownStream(input);
  +            IOUtils.closeQuietly(input);
           }
   
           if (source.length() != destination.length()) {
  @@ -482,10 +482,10 @@
               try {
                   CopyUtils.copy(input, output);
               } finally {
  -                IOUtils.shutdownStream(output);
  +                IOUtils.closeQuietly(output);
               }
           } finally {
  -            IOUtils.shutdownStream(input);
  +            IOUtils.closeQuietly(input);
           }
       }
   
  @@ -595,7 +595,7 @@
           try {
               return IOUtils.toString(in, encoding);
           } finally {
  -            IOUtils.shutdownStream(in);
  +            IOUtils.closeQuietly(in);
           }
       }
   
  @@ -621,7 +621,7 @@
           try {
               out.write(data.getBytes(encoding));
           } finally {
  -            IOUtils.shutdownStream(out);
  +            IOUtils.closeQuietly(out);
           }
       }
   
  
  
  
  1.8       +5 -5      jakarta-commons-sandbox/io/src/java/org/apache/commons/io/IOUtils.java
  
  Index: IOUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/IOUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- IOUtils.java	22 Nov 2003 20:19:29 -0000	1.7
  +++ IOUtils.java	29 Dec 2003 03:28:53 -0000	1.8
  @@ -162,7 +162,7 @@
        *
        * @param input A (possibly null) Reader
        */
  -    public static void shutdownReader( final Reader input )
  +    public static void closeQuietly( final Reader input )
       {
           if( input == null )
           {
  @@ -184,7 +184,7 @@
        *
        * @param output A (possibly null) Writer
        */
  -    public static void shutdownWriter( final Writer output )
  +    public static void closeQuietly( final Writer output )
       {
           if( output == null )
           {
  @@ -205,7 +205,7 @@
        * Equivalent to {@link OutputStream#close()}, except any exceptions will be ignored.
        * @param output A (possibly null) OutputStream
        */
  -    public static void shutdownStream( final OutputStream output )
  +    public static void closeQuietly( final OutputStream output )
       {
           if( output == null )
           {
  @@ -226,7 +226,7 @@
        * Equivalent to {@link InputStream#close()}, except any exceptions will be ignored.
        * @param input A (possibly null) InputStream
        */
  -    public static void shutdownStream( final InputStream input )
  +    public static void closeQuietly( final InputStream input )
       {
           if( input == null )
           {
  
  
  
  1.4       +4 -4      jakarta-commons-sandbox/io/src/test/org/apache/commons/io/testtools/FileBasedTestCase.java
  
  Index: FileBasedTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/testtools/FileBasedTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileBasedTestCase.java	22 Nov 2003 20:09:23 -0000	1.3
  +++ FileBasedTestCase.java	29 Dec 2003 03:28:53 -0000	1.4
  @@ -104,7 +104,7 @@
           try {
               generateTestData(output, size);
           } finally {
  -            IOUtils.shutdownStream(output);
  +            IOUtils.closeQuietly(output);
           }
       }
       
  
  
  

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