Author: dfabulich
Date: Sun Nov  8 17:59:20 2009
New Revision: 833898

URL: http://svn.apache.org/viewvc?rev=833898&view=rev
Log:
Fixing 1.5 compatibility error

Modified:
    
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java

Modified: 
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java?rev=833898&r1=833897&r2=833898&view=diff
==============================================================================
--- 
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
 (original)
+++ 
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
 Sun Nov  8 17:59:20 2009
@@ -29,7 +29,6 @@
 import java.sql.ResultSet;
 import java.sql.Time;
 import java.sql.Timestamp;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -213,7 +212,10 @@
      * @return the value
      */
     public byte[] getNullBytes() {
-        return this.nullBytes == null ? null : Arrays.copyOf(this.nullBytes, 
this.nullBytes.length);
+        if (this.nullBytes == null) return null;
+        byte[] copy = new byte[this.nullBytes.length];
+        System.arraycopy(this.nullBytes, 0, copy, 0, this.nullBytes.length);
+        return copy;
     }
 
     /**
@@ -449,7 +451,9 @@
      * @param nullBytes the value
      */
     public void setNullBytes(byte[] nullBytes) {
-        this.nullBytes = Arrays.copyOf(nullBytes, nullBytes.length);
+        byte[] copy = new byte[nullBytes.length];
+        System.arraycopy(nullBytes, 0, copy, 0, nullBytes.length);
+        this.nullBytes = copy;
     }
 
     /**


Reply via email to