jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1547199 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/SecurityProviderImpl.java
Date Mon, 02 Dec 2013 21:35:16 GMT
Author: jukka
Date: Mon Dec  2 21:35:15 2013
New Revision: 1547199

URL: http://svn.apache.org/r1547199
Log:
OAK-1253: Faster SecurityProviderImpl.getConfigurations()

Use Arrays.asList() instead of a HashSet

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/SecurityProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/SecurityProviderImpl.java?rev=1547199&r1=1547198&r2=1547199&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/SecurityProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/SecurityProviderImpl.java
Mon Dec  2 21:35:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.jackrabbit.oak.security;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.Arrays;
+
 import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.oak.security.authentication.AuthenticationConfigurationImpl;
@@ -61,14 +61,13 @@ public class SecurityProviderImpl implem
     @Nonnull
     @Override
     public Iterable<? extends SecurityConfiguration> getConfigurations() {
-        Set<SecurityConfiguration> scs = new HashSet<SecurityConfiguration>();
-        scs.add(getAuthenticationConfiguration());
-        scs.add(getAuthorizationConfiguration());
-        scs.add(getUserConfiguration());
-        scs.add(getPrincipalConfiguration());
-        scs.add(getPrivilegeConfiguration());
-        scs.add(getTokenConfiguration());
-        return scs;
+        return Arrays.asList(
+                getAuthenticationConfiguration(),
+                getAuthorizationConfiguration(),
+                getUserConfiguration(),
+                getPrincipalConfiguration(),
+                getPrivilegeConfiguration(),
+                getTokenConfiguration());
     }
 
     @Nonnull



Mime
View raw message