[java-identity-provider] branch master updated: IDP-1177 - Centralize deprecation warnings through dedicated function
Scott Cantor
cantor.2 at osu.edu
Sat Jun 3 17:10:58 EDT 2017
This is an automated email from the git hooks/post-receive script.
scantor 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=f2493894a066f132a3cf6fad04c2f1add187efef
The following commit(s) were added to refs/heads/master by this push:
new f249389 IDP-1177 - Centralize deprecation warnings through dedicated function
f249389 is described below
commit f2493894a066f132a3cf6fad04c2f1add187efef
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Sat Jun 3 17:10:56 2017 -0400
IDP-1177 - Centralize deprecation warnings through dedicated function
https://issues.shibboleth.net/jira/browse/IDP-1177
Add warnings to deprecated classes.
---
.../src/main/resources/system/conf/saml-nameid-system.xml | 4 ++--
.../idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java | 13 ++++++++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/idp-conf/src/main/resources/system/conf/saml-nameid-system.xml b/idp-conf/src/main/resources/system/conf/saml-nameid-system.xml
index 5399d2d..4834b10 100644
--- a/idp-conf/src/main/resources/system/conf/saml-nameid-system.xml
+++ b/idp-conf/src/main/resources/system/conf/saml-nameid-system.xml
@@ -75,9 +75,9 @@
class="net.shibboleth.idp.saml.nameid.impl.JDBCPersistentIdStoreEx" />
<!-- These two beans handle legacy support for NameID generation in the Attribute Resolver. -->
- <bean id="shibboleth.LegacySAML1NameIdentifierGenerator"
+ <bean id="shibboleth.LegacySAML1NameIdentifierGenerator" lazy-init="true"
class="net.shibboleth.idp.saml.nameid.impl.LegacySAML1NameIdentifierGenerator" />
- <bean id="shibboleth.LegacySAML2NameIDGenerator"
+ <bean id="shibboleth.LegacySAML2NameIDGenerator" lazy-init="true"
class="net.shibboleth.idp.saml.nameid.impl.LegacySAML2NameIDGenerator" />
<!--
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java
index d966bbf..34a512c 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java
@@ -28,8 +28,11 @@ import net.shibboleth.idp.profile.context.RelyingPartyContext;
import net.shibboleth.idp.saml.nameid.NameIdentifierAttributeEncoder;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
import org.opensaml.messaging.context.navigate.ChildContextLookup;
import org.opensaml.profile.context.ProfileRequestContext;
@@ -112,7 +115,15 @@ public class LegacyNameIdentifierGenerator<NameIdType extends SAMLObject>
"AttributeContext lookup strategy cannot be null");
}
-// Checkstyle: CyclomaticComplexity OFF
+ /** {@inheritDoc} */
+ @Override
+ protected void doInitialize() throws ComponentInitializationException {
+ super.doInitialize();
+
+ DeprecationSupport.warn(ObjectType.CLASS, getClass().getName(), null, null);
+ }
+
+ // Checkstyle: CyclomaticComplexity OFF
/** {@inheritDoc} */
@Override
@Nullable public NameIdType generate(@Nonnull final ProfileRequestContext profileRequestContext,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list