commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1441286 - /commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
Date Fri, 01 Feb 2013 00:57:11 GMT
Author: sebb
Date: Fri Feb  1 00:57:10 2013
New Revision: 1441286

URL: http://svn.apache.org/viewvc?rev=1441286&view=rev
Log:
Unimportant warning about unclosed resource

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java?rev=1441286&r1=1441285&r2=1441286&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
(original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
Fri Feb  1 00:57:10 2013
@@ -275,6 +275,8 @@ public class ByteArrayOutputStream exten
      */
     public static InputStream toBufferedInputStream(final InputStream input)
             throws IOException {
+        // It does not matter if a ByteArrayOutputStream is not closed as close() is a no-op
+        @SuppressWarnings("resource")
         final ByteArrayOutputStream output = new ByteArrayOutputStream();
         output.write(input);
         return output.toBufferedInputStream();



Mime
View raw message