[java-identity-provider] branch master updated: IDP-1361 Deprecate <Resource> as a child of ResourceBackedMetadata Provider

Rod Widdowson rdw at steadingsoftware.com
Fri Dec 7 08:51:16 EST 2018


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=a79b0454ea0e5595ccf28786338925ca93b39d23

The following commit(s) were added to refs/heads/master by this push:
       new  a79b045   IDP-1361 Deprecate <Resource> as a child of ResourceBackedMetadata Provider
a79b045 is described below

commit a79b0454ea0e5595ccf28786338925ca93b39d23
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Dec 7 13:50:31 2018 +0000

    IDP-1361 Deprecate <Resource> as a child of ResourceBackedMetadata Provider
    
    https://issues.shibboleth.net/jira/browse/IDP-1361
---
 .../metadata/impl/ResourceBackedMetadataProviderParser.java         | 6 +++++-
 .../spring/relyingparty/metadata/ResourceMetadataParserTest.java    | 1 -
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/ResourceBackedMetadataProviderParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/ResourceBackedMetadataProviderParser.java
index 084b881..3f91417 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/ResourceBackedMetadataProviderParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/ResourceBackedMetadataProviderParser.java
@@ -81,9 +81,10 @@ public class ResourceBackedMetadataProviderParser extends AbstractReloadingMetad
             if (AttributeSupport.hasAttribute(element, RESOURCE_REF)) {
                 return ResourceBackedMetadataResolver.class;
             }
-            
+
             throw new BeanCreationException("No <Resource> specified for ResourceBackedMetadataProvider");
         }
+
         final QName qName = DOMTypeSupport.getXSIType(resources.get(0));
         if (null == qName) {
             log.error("No type specified for a <Resource> within a ResourceBackedMetadataProvider");
@@ -125,6 +126,9 @@ public class ResourceBackedMetadataProviderParser extends AbstractReloadingMetad
                     parserContext, builder);
             return;
         }
+        DeprecationSupport.warnOnce(ObjectType.ELEMENT, "Resource",
+                parserContext.getReaderContext().getResource().getDescription(),
+                "resourceRef property");
         
         if (resources.size() != 1) {
             log.error("{}: Only one Resource may be supplied to a ResourceBackedMetadataProvider", parserContext
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ResourceMetadataParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ResourceMetadataParserTest.java
index b234279..58f7a64 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ResourceMetadataParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ResourceMetadataParserTest.java
@@ -28,7 +28,6 @@ import org.opensaml.saml.metadata.resolver.impl.HTTPMetadataResolver;
 import org.opensaml.saml.metadata.resolver.impl.ResourceBackedMetadataResolver;
 import org.opensaml.saml.saml2.metadata.EntityDescriptor;
 import org.springframework.beans.factory.BeanCreationException;
-import org.springframework.core.io.ClassPathResource;
 import org.springframework.mock.env.MockPropertySource;
 import org.testng.Assert;
 import org.testng.annotations.Test;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list