Skip to content

Commit

Permalink
Merge pull request #921 from HL7/do-20240702-fix-null-locale-for-region
Browse files Browse the repository at this point in the history
Check for null when inferring locale from region
  • Loading branch information
grahamegrieve authored Jul 3, 2024
2 parents 6dcb97b + 549bb5c commit 7c0eb34
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2224,11 +2224,12 @@ private Locale inferDefaultNarrativeLang(final boolean logDecision) {
if (sourceIg.hasJurisdiction()) {
final String jurisdiction = sourceIg.getJurisdictionFirstRep().getCodingFirstRep().getCode();
Locale localeFromRegion = RegionToLocaleMapper.getLocaleFromRegion(jurisdiction);

if (logDecision) {
logMessage("Using " + localeFromRegion + " as the default narrative language. (inferred from ImplementationGuide.jurisdiction=" + jurisdiction + ")");
if (localeFromRegion != null) {
if (logDecision) {
logMessage("Using " + localeFromRegion + " as the default narrative language. (inferred from ImplementationGuide.jurisdiction=" + jurisdiction + ")");
}
return localeFromRegion;
}
return localeFromRegion;
}
}
if (logDecision) {
Expand Down

0 comments on commit 7c0eb34

Please sign in to comment.