[java-identity-provider] branch maint-3.4 updated: IDP-1414 IDP-1375 Use standard mechanism to mark deprecation of PKIXFilesystem credentials

Rod Widdowson rdw at steadingsoftware.com
Wed Mar 20 10:05:34 EDT 2019


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

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

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

The following commit(s) were added to refs/heads/maint-3.4 by this push:
       new  3010df0   IDP-1414 IDP-1375 Use standard mechanism to mark deprecation of PKIXFilesystem credentials
3010df0 is described below

commit 3010df0c5712cd233932c28b1108187bd5812182
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Mar 20 14:04:48 2019 +0000

    IDP-1414 IDP-1375 Use standard mechanism to mark deprecation of PKIXFilesystem credentials
    
    https://issues.shibboleth.net/jira/browse/IDP-1414
    https://issues.shibboleth.net/jira/browse/IDP-1375
---
 .../trustengine/impl/PKIXResourceValidationInfoParser.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/impl/PKIXResourceValidationInfoParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/impl/PKIXResourceValidationInfoParser.java
index 6967dcf..5fe2d7b 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/impl/PKIXResourceValidationInfoParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/impl/PKIXResourceValidationInfoParser.java
@@ -20,6 +20,8 @@ package net.shibboleth.idp.profile.spring.relyingparty.security.trustengine.impl
 import javax.xml.namespace.QName;
 
 import net.shibboleth.idp.profile.spring.relyingparty.metadata.AbstractMetadataProviderParser;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 import net.shibboleth.utilities.java.support.xml.DOMTypeSupport;
 
 import org.slf4j.Logger;
@@ -43,9 +45,6 @@ public class PKIXResourceValidationInfoParser extends AbstractPKIXValidationInfo
     public static final QName TYPE_NAME_RESOURCE = new QName(AbstractMetadataProviderParser.SECURITY_NAMESPACE,
             "PKIXResourceBacked");
 
-    /** log. */
-    private final Logger log = LoggerFactory.getLogger(PKIXResourceValidationInfoParser.class);
-
     /** {@inheritDoc} */
     @Override protected Class<?> getBeanClass(final Element element) {
         return PKIXResourceValidationInfoFactoryBean.class;
@@ -54,8 +53,11 @@ public class PKIXResourceValidationInfoParser extends AbstractPKIXValidationInfo
     /** {@inheritDoc} */
     @Override protected void doParse(final Element element, final BeanDefinitionBuilder builder) {
         if (TYPE_NAME_FILESYSTEM.equals(DOMTypeSupport.getXSIType(element))) {
-            log.warn("Credential type '{}' has been deprecated; use the compatible Credential type '{}'",
-                    TYPE_NAME_FILESYSTEM.getLocalPart(), TYPE_NAME_RESOURCE.getLocalPart());
+            DeprecationSupport.warnOnce(
+                    ObjectType.ELEMENT,
+                    TYPE_NAME_FILESYSTEM.getLocalPart(),
+                    null,
+                    TYPE_NAME_RESOURCE.getLocalPart());
         }
         super.doParse(element, builder);
     }

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


More information about the commits mailing list