jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1003424 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
Date Fri, 01 Oct 2010 08:01:59 GMT
Author: jukka
Date: Fri Oct  1 08:01:58 2010
New Revision: 1003424

URL: http://svn.apache.org/viewvc?rev=1003424&view=rev
Log:
JCR-2762: Optimize bundle serialization

Ignore time zone differences when comparing InternalValues. This should fix the bundle serialization
test failure in Hudson.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java?rev=1003424&r1=1003423&r2=1003424&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
Fri Oct  1 08:01:58 2010
@@ -708,7 +708,12 @@ public class InternalValue extends Abstr
     public boolean equals(Object object) {
         if (object instanceof InternalValue) {
             InternalValue that = (InternalValue) object;
-            return type == that.type && val.equals(that.val);
+            if (type == PropertyType.DATE) {
+                return that.type == PropertyType.DATE
+                    && getDate().getTimeInMillis() == that.getDate().getTimeInMillis();
+            } else {
+                return type == that.type && val.equals(that.val);
+            }
         } else {
             return false;
         }



Mime
View raw message