jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1504800 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AbstractPropertyState.java
Date Fri, 19 Jul 2013 08:32:11 GMT
Author: jukka
Date: Fri Jul 19 08:32:11 2013
New Revision: 1504800

URL: http://svn.apache.org/r1504800
Log:
OAK-922: Optimize UpdateManyChildNodesTest

Avoid iterating over the potentially long list of values if two multivalued properties have
different counts and thus can't possibly be equal.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AbstractPropertyState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AbstractPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AbstractPropertyState.java?rev=1504800&r1=1504799&r2=1504800&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AbstractPropertyState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AbstractPropertyState.java
Fri Jul 19 08:32:11 2013
@@ -53,6 +53,8 @@ public abstract class AbstractPropertySt
                 return false;
             } else if (!getType().equals(that.getType())) {
                 return false;
+            } else if (isArray() && count() != that.count()) {
+                return false;
             } else if (getType().tag() == PropertyType.BINARY) {
                 return Iterables.elementsEqual(
                         getValue(BINARIES), that.getValue(BINARIES));



Mime
View raw message