[java-plugin-shibd] branch main updated: Base class handles init interface now.
Scott Cantor
cantor.2 at osu.edu
Wed Feb 12 19:33:09 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=4837a8f10a6f20cdc129976eac3d6cc12878da87
The following commit(s) were added to refs/heads/main by this push:
new 4837a8f Base class handles init interface now.
4837a8f is described below
commit 4837a8f10a6f20cdc129976eac3d6cc12878da87
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 12 14:33:06 2025 -0500
Base class handles init interface now.
---
.../shibboleth/sp/impl/DefaultAgentResolver.java | 25 ++++++----------------
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java b/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java
index 1215876..7ddbb58 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java
@@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
-import net.shibboleth.shared.component.InitializableComponent;
import net.shibboleth.shared.resolver.CriteriaSet;
import net.shibboleth.shared.resolver.ResolverException;
import net.shibboleth.shared.spring.config.IdentifiedComponentManager;
@@ -38,11 +37,7 @@ import net.shibboleth.sp.AgentResolver;
/**
* Default implementation of {@link AgentResolver}.
*/
-public class DefaultAgentResolver extends IdentifiedComponentManager<Agent>
- implements AgentResolver, InitializableComponent {
-
- /** Tracks init state. */
- private boolean initialized;
+public class DefaultAgentResolver extends IdentifiedComponentManager<Agent> implements AgentResolver {
/** Agent set. */
@NonnullAfterInit private Map<String,Agent> agentMap;
@@ -58,20 +53,12 @@ public class DefaultAgentResolver extends IdentifiedComponentManager<Agent>
}
/** {@inheritDoc} */
- public void initialize() throws ComponentInitializationException {
-
- if (!initialized) {
- initialized = true;
+ public void doInitialize() throws ComponentInitializationException {
+ super.doInitialize();
- agentMap = getComponents().stream().collect(
- CollectionSupport.nonnullCollector(
- Collectors.toUnmodifiableMap(Agent::getId, Function.identity()))).get();
- }
- }
-
- /** {@inheritDoc} */
- public boolean isInitialized() {
- return initialized;
+ agentMap = getComponents().stream().collect(
+ CollectionSupport.nonnullCollector(
+ Collectors.toUnmodifiableMap(Agent::getId, Function.identity()))).get();
}
/** {@inheritDoc} */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list