[java-opensaml COMMIT] /trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConf...
noreply at shibboleth.net
noreply at shibboleth.net
Tue May 6 19:30:02 EDT 2014
Author: putmanb
Date: Tue May 6 19:30:01 2014
New Revision: 3841
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3841&view=rev
Log:
For white/blacklists, internally use a Set, not a List.
Modified:
trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java
Modified: trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java?rev=3841&r1=3840&r2=3841&view=diff
==============================================================================
--- trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java (original)
+++ trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/impl/BasicWhitelistBlacklistConfiguration.java Tue May 6 19:30:01 2014
@@ -31,8 +31,8 @@
import com.google.common.base.Predicates;
import com.google.common.collect.Collections2;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
/**
* Basic implementation of {@link WhitelistBlacklistConfiguration}.
@@ -74,7 +74,7 @@
* @return the list of algorithms
*/
@Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getWhitelistedAlgorithmURIs() {
- return ImmutableList.copyOf(whitelist);
+ return ImmutableSet.copyOf(whitelist);
}
/**
@@ -87,7 +87,7 @@
whitelist = Collections.emptySet();
return;
}
- whitelist = Lists.newArrayList(Collections2.filter(uris, Predicates.notNull()));
+ whitelist = Sets.newHashSet(Collections2.filter(uris, Predicates.notNull()));
}
/** {@inheritDoc} */
@@ -111,7 +111,7 @@
* @return the list of algorithms
*/
@Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getBlacklistedAlgorithmURIs() {
- return ImmutableList.copyOf(blacklist);
+ return ImmutableSet.copyOf(blacklist);
}
/**
@@ -124,7 +124,7 @@
blacklist = Collections.emptySet();
return;
}
- blacklist = Lists.newArrayList(Collections2.filter(uris, Predicates.notNull()));
+ blacklist = Sets.newHashSet(Collections2.filter(uris, Predicates.notNull()));
}
/** {@inheritDoc} */
More information about the commits
mailing list