[java-shib-attribute] 04/06: JSSH-71 Remove the impact of the DestructableComponent Interface
Codeberg
noreply at shibboleth.net
Wed Jul 22 14:16:03 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-shib-attribute.
View the commit online:
https://codeberg.org/Shibboleth/java-shib-attribute/commit/d0bf2bc3055e88b6fe878eddb743e2d891106e7b
commit d0bf2bc3055e88b6fe878eddb743e2d891106e7b
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Jul 21 16:36:24 2026 +0100
JSSH-71 Remove the impact of the DestructableComponent Interface
https://shibboleth.atlassian.net/browse/JSSH-71
Stub out teardownInstance() in factory beans to stop debugging
noise when the base class calls destroy() on the component
---
.../dc/ldap/impl/CredentialConfigFactoryBean.java | 17 ++++++++++++++++-
.../spring/impl/AbstractResolverPluginFactoryBean.java | 18 +++++++++++++++---
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java b/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java
index f83cc891c..27d2a8560 100644
--- a/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java
+++ b/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java
@@ -24,14 +24,19 @@ import org.ldaptive.ssl.CredentialConfig;
import org.ldaptive.ssl.CredentialConfigFactory;
import org.opensaml.security.credential.Credential;
import org.opensaml.security.x509.X509Credential;
+import org.opensaml.security.x509.impl.PKIXX509CredentialTrustEngine;
import org.slf4j.Logger;
import org.springframework.beans.factory.BeanCreationException;
+import net.shibboleth.shared.primitive.AnnotationsSupport;
import net.shibboleth.shared.primitive.LoggerFactory;
import net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean;
/**
* A Factory bean to summon up {@link CredentialConfig} from supplied <Credential> statements.
+ *
+ * TODO: Remove the {@link #destroyInstance()} from this class in V6.
+ *
*/
public class CredentialConfigFactoryBean extends AbstractComponentAwareFactoryBean<CredentialConfig> {
@@ -125,4 +130,14 @@ public class CredentialConfigFactoryBean extends AbstractComponentAwareFactoryBe
trustCredential = credential;
}
-}
\ No newline at end of file
+ /**
+ * {@inheritDoc}
+ *
+ * <p>Call a destroy method if aposite.</p>
+ * <p> We do not call the parent tear down so as to avoid any deprecation logging</>
+ */
+ @Override protected void destroyInstance(@Nullable final CredentialConfig instance) throws Exception {
+ AnnotationsSupport.callOnTeardownAnnotations(instance);
+ }
+}
+
diff --git a/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AbstractResolverPluginFactoryBean.java b/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AbstractResolverPluginFactoryBean.java
index 217c4dd76..6ae9de3bc 100644
--- a/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AbstractResolverPluginFactoryBean.java
+++ b/shib-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AbstractResolverPluginFactoryBean.java
@@ -20,16 +20,20 @@ import java.util.function.Predicate;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import org.ldaptive.ssl.CredentialConfig;
import org.opensaml.profile.context.ProfileRequestContext;
import net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin;
import net.shibboleth.idp.attribute.resolver.ResolverAttributeDefinitionDependency;
import net.shibboleth.idp.attribute.resolver.ResolverDataConnectorDependency;
+import net.shibboleth.shared.primitive.AnnotationsSupport;
import net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean;
/**
* A factory bean to collect the parameterization that goes onto a {@link AbstractResolverPlugin}.
- *
+ *
+ * TODO: Remove the {@link #destroyInstance()} from this class in V6.
+ *
* @param <T> The exact type being deployed.
*/
public abstract class AbstractResolverPluginFactoryBean<T extends AbstractResolverPlugin<?>> extends
@@ -168,5 +172,13 @@ public abstract class AbstractResolverPluginFactoryBean<T extends AbstractResolv
what.setPropagateResolutionExceptions(flag);
}
}
-
-}
\ No newline at end of file
+ /**
+ * {@inheritDoc}
+ *
+ * <p>Call a destroy method if aposite.</p>
+ * <p> We do not call the parent tear down so as to avoid any deprecation logging</>
+ */
+ @Override protected void destroyInstance(@Nullable final T instance) throws Exception {
+ AnnotationsSupport.callOnTeardownAnnotations(instance);
+ }
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list