bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1614731 - /bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/util/IOs.java
Date Wed, 30 Jul 2014 18:35:46 GMT
Author: rmannibucau
Date: Wed Jul 30 18:35:46 2014
New Revision: 1614731

URL: http://svn.apache.org/r1614731
Log:
slurping all streams otherwise we have to mark it and it can be broken then, this can be enhanced
later if needed

Modified:
    bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/util/IOs.java

Modified: bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/util/IOs.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/util/IOs.java?rev=1614731&r1=1614730&r2=1614731&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/util/IOs.java (original)
+++ bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/util/IOs.java Wed Jul
30 18:35:46 2014
@@ -34,9 +34,10 @@ public class IOs {
             return null;
         }
 
-        if (stream.markSupported()) {
+        // force ByteArrayOutputStream since we close the stream ATM
+        /*if (stream.markSupported()) {
             return stream;
-        } else {
+        } else {*/
             try {
                 final ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 final byte[] buffer = new byte[1024];
@@ -48,7 +49,7 @@ public class IOs {
             } catch (final IOException e) {
                 throw new RuntimeException(e);
             }
-        }
+        /*}*/
     }
 
     public static void closeQuietly(Closeable closeable) {



Mime
View raw message