From 7e8cdce7426911b88d64175fbb4cb168cb5ecb18 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Thu, 24 Oct 2024 22:06:23 +0200 Subject: [PATCH] Sorting AS4 profiles by name for nicer logging --- .../java/com/helger/phase4/profile/AS4ProfileManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phase4-lib/src/main/java/com/helger/phase4/profile/AS4ProfileManager.java b/phase4-lib/src/main/java/com/helger/phase4/profile/AS4ProfileManager.java index 0b025db98..2ca5f19d5 100644 --- a/phase4-lib/src/main/java/com/helger/phase4/profile/AS4ProfileManager.java +++ b/phase4-lib/src/main/java/com/helger/phase4/profile/AS4ProfileManager.java @@ -27,7 +27,7 @@ import com.helger.commons.ValueEnforcer; import com.helger.commons.annotation.ReturnsMutableCopy; -import com.helger.commons.collection.impl.CommonsHashMap; +import com.helger.commons.collection.impl.CommonsTreeMap; import com.helger.commons.collection.impl.ICommonsList; import com.helger.commons.collection.impl.ICommonsMap; import com.helger.commons.concurrent.SimpleReadWriteLock; @@ -48,7 +48,7 @@ public class AS4ProfileManager implements IAS4ProfileManager private final SimpleReadWriteLock m_aRWLock = new SimpleReadWriteLock (); @GuardedBy ("m_aRWLock") - private final ICommonsMap m_aProfiles = new CommonsHashMap <> (); + private final ICommonsMap m_aProfiles = new CommonsTreeMap <> (); private void _registerAll () { @@ -62,7 +62,9 @@ private void _registerAll () if (nCount == 0) LOGGER.warn ("No AS4 profile is registered. This is most likely a configuration problem. Please make sure that at least one of the 'phase4-profile-*' modules is on the classpath."); else - LOGGER.info ((nCount == 1 ? "1 AS4 profile is registered " : nCount + " AS4 profiles are registered")); + LOGGER.info ((nCount == 1 ? "1 AS4 profile is registered " : nCount + " AS4 profiles are registered") + + ": " + + m_aProfiles.keySet ()); } public AS4ProfileManager ()