openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r832357 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Date Tue, 03 Nov 2009 09:22:43 GMT
Author: ppoddar
Date: Tue Nov  3 09:22:42 2009
New Revision: 832357

URL: http://svn.apache.org/viewvc?rev=832357&view=rev
Log:
Check for null clob

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=832357&r1=832356&r2=832357&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Tue Nov  3 09:22:42 2009
@@ -4746,11 +4746,13 @@
                 throw new InternalException(_loc.get("stream-exception"));
             }
             Clob clob = res.getClob(1);
-            Writer writer = clob.setCharacterStream(1);
-            copy(reader, writer);
-            writer.close();
-            res.updateClob(1, clob);
-            res.updateRow();
+            if (clob != null) {
+                Writer writer = clob.setCharacterStream(1);
+                copy(reader, writer);
+                writer.close();
+                res.updateClob(1, clob);
+                res.updateRow();
+            }
 
         } catch (IOException ioe) {
             throw new StoreException(ioe);



Mime
View raw message