Skip to content

Commit

Permalink
Check for null when inferring locale from region
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek committed Jul 2, 2024
1 parent 7856b3d commit 549bb5c
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 549bb5c

Please sign in to comment.