Findbugs: don't expose internal mutable state git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk@1611129 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/22183c68 Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/22183c68 Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/22183c68 Branch: refs/heads/master Commit: 22183c68c099696d71e3a953dff52b95f688aac3 Parents: b76da88 Author: Benedikt Ritter <[email protected]> Authored: Wed Jul 16 18:39:33 2014 +0000 Committer: Benedikt Ritter <[email protected]> Committed: Wed Jul 16 18:39:33 2014 +0000 ---------------------------------------------------------------------- .../commons/dbutils/wrappers/SqlNullCheckedResultSet.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/22183c68/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java b/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java index a83735c..f8d1d3f 100644 --- a/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java +++ b/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java @@ -253,7 +253,7 @@ public class SqlNullCheckedResultSet implements InvocationHandler { * @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 implements InvocationHandler { * @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 implements InvocationHandler { * @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 implements InvocationHandler { * @param nullTimestamp the value */ public void setNullTimestamp(Timestamp nullTimestamp) { - this.nullTimestamp = nullTimestamp; + this.nullTimestamp = nullTimestamp != null ? new Timestamp(nullTimestamp.getTime()) : null; } /**
