jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1374803 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Sun, 19 Aug 2012 17:29:05 GMT
Author: mduerig
Date: Sun Aug 19 17:29:05 2012
New Revision: 1374803

URL: http://svn.apache.org/viewvc?rev=1374803&view=rev
Log:
simplify

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1374803&r1=1374802&r2=1374803&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Sun Aug 19 17:29:05 2012
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.oak.jcr;
 
 import java.io.InputStream;
 import java.math.BigDecimal;
-import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collections;
 import java.util.Iterator;
@@ -57,6 +56,7 @@ import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
 import org.apache.jackrabbit.commons.ItemNameMatcher;
 import org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter;
 import org.apache.jackrabbit.commons.iterator.PropertyIteratorAdapter;
@@ -945,12 +945,7 @@ public class NodeImpl extends ItemImpl<N
                     nodeModified = true;
                     dlg.setProperty(jcrMixinTypes, Collections.singletonList(cv));
                 } else {
-                    List<CoreValue> values = new ArrayList<CoreValue>();
-                    for (CoreValue existingValue : mixins.getValues()) {
-                        if (!values.contains(existingValue)) {
-                            values.add(existingValue);
-                        }
-                    }
+                    List<CoreValue> values = Lists.newArrayList(mixins.getValues());
                     if (!values.contains(cv)) {
                         values.add(cv);
                         nodeModified = true;



Mime
View raw message