[java-shib-shared] 01/05: JSSH-71 Remove the impact of the DestructableComponent Interface

Codeberg noreply at shibboleth.net
Mon Jul 20 12:31:36 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-shared.

View the commit online:
https://codeberg.org/Shibboleth/java-shib-shared/commit/56b1e16f2289f433e8bee1ce8ecdd74495d1f2f1

commit 56b1e16f2289f433e8bee1ce8ecdd74495d1f2f1
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat Jul 18 14:51:13 2026 +0100

    JSSH-71 Remove the impact of the DestructableComponent Interface
    
    https://shibboleth.atlassian.net/browse/JSSH-71
    
    Add logging (at TRACE) in the Base component when a
    component is explicitly destroyed.
    
    Also turn on trace logging for this object.
---
 .../shared/component/AbstractInitializableComponent.java   | 14 ++++++++++++++
 shib-support/src/test/resources/logback-test.xml           |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java b/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java
index f946b715..ba6b97b3 100644
--- a/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java
+++ b/shib-support/src/main/java/net/shibboleth/shared/component/AbstractInitializableComponent.java
@@ -138,6 +138,20 @@ public abstract class AbstractInitializableComponent implements DestructableComp
     @Deprecated(forRemoval = true, since = "9.3")
     protected void doDestroy() {
 
+        if (getLog().isTraceEnabled()) {
+            //
+            // In a V6.0 ready system nothing should be being called here.
+            // Add a lot of logging (at TRACE) to help find out where this comes from.
+            //
+            if (this instanceof IdentifiedComponent) {
+                final String theName = ((IdentifiedComponent) this).getId();
+                getLog().trace("Component {} of type {} was called at destroy() {}",
+                        theName, this.getClass().getName(), Thread.currentThread().getStackTrace());
+            } else {
+                getLog().trace("Anonymous component of type {} was called at destroy {}",
+                        this.getClass().getName(), Thread.currentThread().getStackTrace());
+            }
+        }
     }
 
     /**
diff --git a/shib-support/src/test/resources/logback-test.xml b/shib-support/src/test/resources/logback-test.xml
index 55f1d6ee..9249283e 100644
--- a/shib-support/src/test/resources/logback-test.xml
+++ b/shib-support/src/test/resources/logback-test.xml
@@ -9,6 +9,8 @@
         </encoder>
     </appender>
 
+    <logger name="net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent" level="TRACE"/>
+
     <root level="WARN">
         <appender-ref ref="STDOUT" />
     </root>

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


More information about the commits mailing list