commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1611129 - /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
Date Wed, 16 Jul 2014 18:39:34 GMT
Author: britter
Date: Wed Jul 16 18:39:33 2014
New Revision: 1611129

URL: http://svn.apache.org/r1611129
Log:
Findbugs: don't expose internal mutable state

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

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java?rev=1611129&r1=1611128&r2=1611129&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
Wed Jul 16 18:39:33 2014
@@ -253,7 +253,7 @@ public class SqlNullCheckedResultSet imp
      * @return the value
      */
     public Date getNullDate() {
-        return this.nullDate;
+        return this.nullDate != null ? new Date(this.nullDate.getTime()) : null;
     }
 
     /**
@@ -353,7 +353,7 @@ public class SqlNullCheckedResultSet imp
      * @return the value
      */
     public Timestamp getNullTimestamp() {
-        return this.nullTimestamp;
+        return this.nullTimestamp != null ? new Timestamp(this.nullTimestamp.getTime()) :
null;
     }
 
     /**
@@ -492,7 +492,7 @@ public class SqlNullCheckedResultSet imp
      * @param nullDate the value
      */
     public void setNullDate(Date nullDate) {
-        this.nullDate = nullDate;
+        this.nullDate = nullDate != null ? new Date(nullDate.getTime()) : null;
     }
 
     /**
@@ -592,7 +592,7 @@ public class SqlNullCheckedResultSet imp
      * @param nullTimestamp the value
      */
     public void setNullTimestamp(Timestamp nullTimestamp) {
-        this.nullTimestamp = nullTimestamp;
+        this.nullTimestamp = nullTimestamp != null ? new Timestamp(nullTimestamp.getTime())
: null;
     }
 
     /**



Mime
View raw message