From 61510f907214c2960763cbb2f3c3bd9d30c7af6c Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Thu, 14 Sep 2023 20:45:12 +0200 Subject: [PATCH] The profile selectors falls back to IAS4ProfileManager.getDefaultProfile --- .../helger/phase4/servlet/mgr/AS4ProfileSelector.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/phase4-lib/src/main/java/com/helger/phase4/servlet/mgr/AS4ProfileSelector.java b/phase4-lib/src/main/java/com/helger/phase4/servlet/mgr/AS4ProfileSelector.java index 4be614ab2..1b2edb5a3 100644 --- a/phase4-lib/src/main/java/com/helger/phase4/servlet/mgr/AS4ProfileSelector.java +++ b/phase4-lib/src/main/java/com/helger/phase4/servlet/mgr/AS4ProfileSelector.java @@ -22,6 +22,8 @@ import com.helger.commons.concurrent.SimpleReadWriteLock; import com.helger.phase4.config.AS4Configuration; +import com.helger.phase4.mgr.MetaAS4Manager; +import com.helger.phase4.profile.IAS4Profile; /** * Static helper class to make the AS4 profile selection more deterministic and @@ -69,6 +71,13 @@ public static String getAS4ProfileID () // Fall back to the configuration file // The profile ID from the configuration file is optional ret = AS4Configuration.getAS4ProfileID (); + if (ret == null) + { + // Fall back to the default profile ID + final IAS4Profile aDefProfile = MetaAS4Manager.getProfileMgr ().getDefaultProfileOrNull (); + if (aDefProfile != null) + ret = aDefProfile.getID (); + } } return ret; }