openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mprud...@apache.org
Subject svn commit: r482308 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyTimestamp.java
Date Mon, 04 Dec 2006 19:32:55 GMT
Author: mprudhom
Date: Mon Dec  4 11:32:54 2006
New Revision: 482308

URL: http://svn.apache.org/viewvc?view=rev&rev=482308
Log:
Fixed bug where we weren't copying the nanoseconds when the Timestamp is cloned.

Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyTimestamp.java

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyTimestamp.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyTimestamp.java?view=diff&rev=482308&r1=482307&r2=482308
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyTimestamp.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyTimestamp.java
Mon Dec  4 11:32:54 2006
@@ -66,7 +66,11 @@
     }
 
     public Object copy(Object orig) {
-        return new Timestamp(((Timestamp) orig).getTime());
+        Timestamp origTimestamp = (Timestamp)orig;
+        Timestamp copy = new Timestamp(origTimestamp.getTime());
+        copy.setNanos(origTimestamp.getNanos());
+        return copy;
+
     }
 
     public void setYear(int val) {



Mime
View raw message