[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl: ChainingM...
noreply at shibboleth.net
noreply at shibboleth.net
Fri May 9 06:46:29 EDT 2014
Author: rdw
Date: Fri May 9 06:46:29 2014
New Revision: 3853
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3853&view=rev
Log:
OSJ-74 Fix recursion in doDestroy, add super.doInitialize call in doInitialize.
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/ChainingMetadataResolver.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/CompositeMetadataResolver.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/ChainingMetadataResolver.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/ChainingMetadataResolver.java?rev=3853&r1=3852&r2=3853&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/ChainingMetadataResolver.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/ChainingMetadataResolver.java Fri May 9 06:46:29 2014
@@ -39,12 +39,11 @@
/**
* A metadata provider that uses registered resolvers, in turn, to answer queries.
*
- * The Iterable of entity descriptors returned is the first non-null and non-empty Iterable found
- * while iterating over the registered resolvers in resolver list order.
+ * The Iterable of entity descriptors returned is the first non-null and non-empty Iterable found while iterating over
+ * the registered resolvers in resolver list order.
*
*/
-public class ChainingMetadataResolver extends AbstractIdentifiableInitializableComponent
- implements MetadataResolver{
+public class ChainingMetadataResolver extends AbstractIdentifiableInitializableComponent implements MetadataResolver {
/** Class logger. */
private final Logger log = LoggerFactory.getLogger(ChainingMetadataResolver.class);
@@ -77,46 +76,41 @@
public void setResolvers(List<MetadataResolver> newResolvers) throws ResolverException {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
-
+
if (newResolvers == null || newResolvers.isEmpty()) {
resolvers = Collections.emptyList();
return;
}
-
+
resolvers = Collections.unmodifiableList(newResolvers);
}
/** {@inheritDoc} */
- @Override
- public boolean isRequireValidMetadata() {
+ @Override public boolean isRequireValidMetadata() {
log.warn("Attempt to access unsupported requireValidMetadata property on ChainingMetadataResolver");
return false;
}
/** {@inheritDoc} */
- @Override
- public void setRequireValidMetadata(boolean requireValidMetadata) {
+ @Override public void setRequireValidMetadata(boolean requireValidMetadata) {
throw new UnsupportedOperationException("Setting require valid metadata is not supported on chaining resolver");
}
/** {@inheritDoc} */
- @Override
- public MetadataFilter getMetadataFilter() {
+ @Override public MetadataFilter getMetadataFilter() {
log.warn("Attempt to access unsupported MetadataFilter property on ChainingMetadataResolver");
return null;
}
/** {@inheritDoc} */
- @Override
- public void setMetadataFilter(MetadataFilter newFilter) {
+ @Override public void setMetadataFilter(MetadataFilter newFilter) {
throw new UnsupportedOperationException("Metadata filters are not supported on ChainingMetadataProviders");
}
-
+
/** {@inheritDoc} */
- @Override
- @Nullable public EntityDescriptor resolveSingle(CriteriaSet criteria) throws ResolverException {
+ @Override @Nullable public EntityDescriptor resolveSingle(CriteriaSet criteria) throws ResolverException {
ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
-
+
Iterable<EntityDescriptor> iterable = resolve(criteria);
if (iterable != null) {
Iterator<EntityDescriptor> iterator = iterable.iterator();
@@ -126,12 +120,11 @@
}
return null;
}
-
+
/** {@inheritDoc} */
- @Override
- @Nonnull public Iterable<EntityDescriptor> resolve(CriteriaSet criteria) throws ResolverException {
+ @Override @Nonnull public Iterable<EntityDescriptor> resolve(CriteriaSet criteria) throws ResolverException {
ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
-
+
for (MetadataResolver resolver : resolvers) {
try {
Iterable<EntityDescriptor> descriptors = resolver.resolve(criteria);
@@ -139,17 +132,18 @@
return descriptors;
}
} catch (ResolverException e) {
- log.warn("Error retrieving metadata from resolver of type {}, proceeding to next resolver",
- resolver.getClass().getName(), e);
[... 57 lines stripped ...]
More information about the commits
mailing list