jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1625321 - /jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/StreamWrapper.java
Date Tue, 16 Sep 2014 14:44:14 GMT
Author: unico
Date: Tue Sep 16 14:44:13 2014
New Revision: 1625321

URL: http://svn.apache.org/r1625321
Log:
JCR-3810 try reset other types of InputStreams as well

Modified:
    jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/StreamWrapper.java

Modified: jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/StreamWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/StreamWrapper.java?rev=1625321&r1=1625320&r2=1625321&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/StreamWrapper.java
(original)
+++ jackrabbit/trunk/jackrabbit-data/src/main/java/org/apache/jackrabbit/core/util/db/StreamWrapper.java
Tue Sep 16 14:44:13 2014
@@ -75,8 +75,7 @@ public class StreamWrapper {
     /**
      * Resets the internal InputStream that it could be re-read.<br>
      * Is used from {@link RetryManager} if a {@link SQLException} has occurred.<br>
-     * At the moment only a {@link TempFileInputStream} can be reseted.
-     * 
+     *
      * @return returns true if it was able to reset the Stream
      */
     public boolean resetStream() {
@@ -91,6 +90,11 @@ public class StreamWrapper {
     			log.warn("Failed to create a new TempFileInputStream", e);
     		}
     	}
-    	return false;
+        try {
+            stream.reset();
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
 	}
 }



Mime
View raw message