[spring-extensions] 01/01: JSPT-98 Integrate lifecycle checking methods in base classes

Rod Widdowson rdw at steadingsoftware.com
Wed Jul 13 08:51:33 UTC 2022


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

rdw pushed a commit to branch main
in repository spring-extensions.

View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=5f37c8ca1a61d9572da97e00191bf71a1b343995

commit 5f37c8ca1a61d9572da97e00191bf71a1b343995
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jun 12 15:01:46 2022 +0100

    JSPT-98 Integrate lifecycle checking methods in base classes
    
    https://shibboleth.atlassian.net/browse/JSPT-98
    
    Stop using ComponentSupport and use the appropriate methods instead.
---
 .../shibboleth/ext/spring/service/LogbackLoggingService.java   | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/main/java/net/shibboleth/ext/spring/service/LogbackLoggingService.java b/src/main/java/net/shibboleth/ext/spring/service/LogbackLoggingService.java
index c2c5ca9..ae510fb 100644
--- a/src/main/java/net/shibboleth/ext/spring/service/LogbackLoggingService.java
+++ b/src/main/java/net/shibboleth/ext/spring/service/LogbackLoggingService.java
@@ -39,7 +39,6 @@ import ch.qos.logback.core.status.StatusManager;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
 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.StringSupport;
 import net.shibboleth.utilities.java.support.resource.Resource;
@@ -77,8 +76,7 @@ public class LogbackLoggingService extends AbstractReloadableService<Object>
 
     /** {@inheritDoc} */
     public void setLoggingConfiguration(@Nonnull final Resource configuration) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
+        throwSetterPreconditionExceptions();
         configurationResource = Constraint.isNotNull(configuration, "Logging configuration resource cannot be null");
     }
     
@@ -88,8 +86,7 @@ public class LogbackLoggingService extends AbstractReloadableService<Object>
      * @param fallback fallback configuration resouurce
      */
     public void setFallbackConfiguration(@Nonnull final Resource fallback) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-        
+        throwSetterPreconditionExceptions();
         fallbackConfiguration = Constraint.isNotNull(fallback, "Logging configuration falback resource cannot be null");
     }
     
@@ -99,8 +96,7 @@ public class LogbackLoggingService extends AbstractReloadableService<Object>
      * @param name property name
      */
     public void setHomePropertyName(@Nullable @NotEmpty final String name) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-        
+        throwSetterPreconditionExceptions();
         homePropertyName = StringSupport.trimOrNull(name);
     }
 

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


More information about the commits mailing list