[java-idp-plugin-duo] branch main updated: Improve logging and update setter preconditions check

Phil Smart philip.smart at jisc.ac.uk
Wed Feb 21 09:15:47 UTC 2024


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

philsmart pushed a commit to branch main
in repository java-idp-plugin-duo.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-duo.git;a=commit;h=6ee681a967aa4410362f6d6cc8ad1e1971fc7cb2

The following commit(s) were added to refs/heads/main by this push:
     new 6ee681a9 Improve logging and update setter preconditions check
6ee681a9 is described below

commit 6ee681a967aa4410362f6d6cc8ad1e1971fc7cb2
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Feb 21 09:15:44 2024 +0000

    Improve logging and update setter preconditions check
    
     - Switch DuoClient instance logging to TRACE from DEBUG
---
 .../idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java
index 6c7b0779..963b4998 100644
--- a/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java
+++ b/idp-duo-impl/src/main/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistry.java
@@ -91,8 +91,7 @@ public class DefaultDuoOIDCClientRegistry extends AbstractIdentifiableInitializa
      * @param factory the factory.
      */
     public synchronized void setClientFactory(@Nonnull final DuoOIDCClientFactory factory) {
-        ifInitializedThrowUnmodifiabledComponentException();
-        ifDestroyedThrowDestroyedComponentException();
+        checkSetterPreconditions();
         
         clientFactory = Constraint.isNotNull(factory, "Duo client factory can not be null");
     }
@@ -115,7 +114,7 @@ public class DefaultDuoOIDCClientRegistry extends AbstractIdentifiableInitializa
             //this is an atomic call, avoiding the need to externally synchronise here e.g. two clients should never 
             //be created for the same integration. Client is properly published once created.
             final DuoOIDCClient client =  clientRegistry.computeIfAbsent(integration,clientRegistryMappingFunction);
-            log.debug("Duo registry returning the DuoClient instance '{}' of type '{}'",
+            log.trace("Duo registry returning the DuoClient instance '{}' of type '{}'",
                     client.getClientId(),client.getClass().getCanonicalName());
             return client;
         } catch (final DuoClientInitializationException e) {

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


More information about the commits mailing list