jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r354519 - /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java
Date Tue, 06 Dec 2005 19:38:06 GMT
Author: tripod
Date: Tue Dec  6 11:37:56 2005
New Revision: 354519

URL: http://svn.apache.org/viewcvs?rev=354519&view=rev
Log:
- guarding eventual NullPointerException

Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java?rev=354519&r1=354518&r2=354519&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java
Tue Dec  6 11:37:56 2005
@@ -47,6 +47,7 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.FilterInputStream;
+import java.io.ByteArrayInputStream;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
@@ -1035,6 +1036,10 @@
                         throw new Exception("no such BLOB: " + blobId);
                     }
                     InputStream in = rs.getBinaryStream(1);
+                    if (in == null) {
+                        closeResultSet(rs);
+                        return new ByteArrayInputStream(new byte[0]);
+                    }
 
                     /**
                      * return an InputStream wrapper in order to



Mime
View raw message