Skip to content

Commit

Permalink
The profile selectors falls back to IAS4ProfileManager.getDefaultProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Sep 14, 2023
1 parent 2b121b0 commit 61510f9
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 61510f9

Please sign in to comment.