db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r546444 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java
Date Tue, 12 Jun 2007 10:01:28 GMT
Author: kristwaa
Date: Tue Jun 12 03:01:27 2007
New Revision: 546444

URL: http://svn.apache.org/viewvc?view=rev&rev=546444
Log:
DERBY-2802: LOBStreamControl.replaceBytes can throw null pointer exception while trying to
access databytes after calling init.
Patch file: derby-2802.diff

Patch contributed by Anurag Shekhar.
--ThiB line, and those below, will be ignored--

M    LOBStreamControl.java

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java?view=diff&rev=546444&r1=546443&r2=546444
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java Tue Jun
12 03:01:27 2007
@@ -447,10 +447,11 @@
         long finalLength = length - endPos + stPos + buf.length;
         if (isBytes) {
             if (finalLength > bufferSize) {
-                init (dataBytes, stPos);
+                byte [] tmpBytes = dataBytes;
+                init (tmpBytes, stPos);
                 write (buf, 0, buf.length, getLength());
                 if (endPos < length)
-                    write (dataBytes, (int) endPos, 
+                    write (tmpBytes, (int) endPos, 
                             (int) (length - endPos), getLength());
             }
             else {



Mime
View raw message