[java-identity-provider COMMIT] in /trunk: idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relying...

noreply at shibboleth.net noreply at shibboleth.net
Mon Mar 24 11:38:49 EDT 2014


Author: rdw
Date: Mon Mar 24 11:38:48 2014
New Revision: 5626

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5626&view=rev
Log:
IDP-277 Remove deprecated attributes from both the schema and the nascent parsers

Modified:
    trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/InlineMetadataParserTest.java
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/inLineMaintainExpired.xml
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/inLineMaintainExpiredBoth.xml
    trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd

Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java?rev=5626&r1=5625&r2=5626&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java (original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java Mon Mar 24 11:38:48 2014
@@ -22,17 +22,14 @@
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
-import net.shibboleth.utilities.java.support.xml.AttributeSupport;
 import net.shibboleth.utilities.java.support.xml.DomTypeSupport;
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.BeanCreationException;
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
 import org.springframework.beans.factory.xml.ParserContext;
-import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 
 /**
@@ -86,21 +83,9 @@
         }
 
         if (isPresentNotChaining(element, "requireValidMetadata")) {
-            if (element.hasAttributeNS(null, "maintainExpiredMetadata")) {
-                log.error("maintainExpiredMetadata is deprecated."
-                        + "  It cannot be present when requireValidMetadata is present");
-                throw new BeanCreationException("maintainExpiredMetadata is deprecated."
-                        + "  It cannot be present when requireValidMetadata is present");
-            }
+            
             builder.addPropertyValue("requireValidMetadata", element.getAttributeNS(null, "requireValidMetadata"));
 
-        } else if (isPresentNotChaining(element, "maintainExpiredMetadata")) {
-            // since we negate this has to be converted here
-            final Attr attr = element.getAttributeNodeNS(null, "maintainExpiredMetadata");
-            final boolean requireValidMetadata = !AttributeSupport.getAttributeValueAsBoolean(attr);
-            log.warn("Use of metadata provider configuration attribute 'maintainExpiredMetadata' is deprecated."
-                    + "  Use requireValidMetadata=\"{}\" instead.", requireValidMetadata);
-            builder.addPropertyValue("requireValidMetadata", requireValidMetadata);
         }
 
         final List<Element> filters =

Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/InlineMetadataParserTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/InlineMetadataParserTest.java?rev=5626&r1=5625&r2=5626&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/InlineMetadataParserTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/InlineMetadataParserTest.java Mon Mar 24 11:38:48 2014
@@ -23,7 +23,6 @@
 
 import org.opensaml.saml.metadata.resolver.impl.DOMMetadataResolver;
 import org.opensaml.saml.saml2.metadata.EntityDescriptor;
-import org.springframework.beans.factory.BeanDefinitionStoreException;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -44,25 +43,6 @@
         
     }
     
-    @Test public void maintainExpired() throws ResolverException {
-        DOMMetadataResolver resolver = getBean(DOMMetadataResolver.class, false, "inLineMaintainExpired.xml");
-        
-        Assert.assertEquals(resolver.getId(), "maintainExpired");
-   
-        final Iterator<EntityDescriptor> entities = resolver.resolve(criteriaFor(IDP_ID)).iterator();

[... 64 lines stripped ...]


More information about the commits mailing list