[java-identity-provider COMMIT] /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/AttributeMap...

noreply at shibboleth.net noreply at shibboleth.net
Thu Jul 24 00:10:43 EDT 2014


Author: dfisher
Date: Thu Jul 24 00:10:42 2014
New Revision: 6341

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6341&view=rev
Log:
Log error message once for each refresh failure.
Resolves IDP-438.

Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/AttributeMappingNodeProcessor.java

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/AttributeMappingNodeProcessor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/AttributeMappingNodeProcessor.java?rev=6341&r1=6340&r2=6341&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/AttributeMappingNodeProcessor.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/metadata/impl/AttributeMappingNodeProcessor.java Thu Jul 24 00:10:42 2014
@@ -63,6 +63,9 @@
     /** Service used to get the resolver used to fetch attributes. */
     @Nonnull private final ReloadableService<AttributeResolver> attributeResolverService;
 
+    /** Whether the last invocation of {@link #refreshMappers()} failed. */
+    @Nonnull private boolean refreshFailed;
+
     /** Cached RequestedAttributeMapper. */
     @Nullable private RequestedAttributesMapper requestedAttributesMapper;
 
@@ -137,12 +140,16 @@
             final DateTime when = attributeResolverService.getLastSuccessfulReloadInstant();
             component = attributeResolverService.getServiceableComponent();
             if (null == component) {
-                log.error("{} generated Requested Attributes Mapper: Invalid Attribute resolver configuration.");
+                if (!refreshFailed) {
+                    log.error("Requested Attributes Mapper: Invalid Attribute resolver configuration.");
+                }
+                refreshFailed = true;
             } else {
                 final AttributeResolver attributeResolver = component.getComponent();
                 ram = new RequestedAttributesMapper(attributeResolver);
                 am = new SAML2AttributesMapper(attributeResolver);
 
+                refreshFailed = false;
                 lastReload = when;
             }
         } finally {



More information about the commits mailing list