jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1378850 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
Date Thu, 30 Aug 2012 08:30:46 GMT
Author: jukka
Date: Thu Aug 30 08:30:46 2012
New Revision: 1378850

URL: http://svn.apache.org/viewvc?rev=1378850&view=rev
Log:
OAK-50 : Implement User Management

The return value of property.getValues() can be immutable, so create a new list before modifying
it.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java?rev=1378850&r1=1378849&r2=1378850&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/MembershipProviderImpl.java
Thu Aug 30 08:30:46 2012
@@ -28,6 +28,8 @@ 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.iterator.RangeIteratorAdapter;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.CoreValue;
@@ -191,6 +193,7 @@ public class MembershipProviderImpl exte
                 if (values.contains(toAdd)) {
                     return false;
                 } else {
+                    values = Lists.newArrayList(values);
                     values.add(toAdd);
                 }
             } else {



Mime
View raw message