fix hint box = null error

This commit is contained in:
Grahame Grieve 2020-01-13 14:25:51 +11:00
parent f3d39b4112
commit 644c07429c
1 changed files with 10 additions and 2 deletions

View File

@ -33,11 +33,19 @@ public class TranslatingUtilities extends org.hl7.fhir.utilities.TranslatingUtil
}
public String gt(@SuppressWarnings("rawtypes") PrimitiveType value) {
return hasTranslator() ? ((TranslationServices) getTranslator()).gt(value) : value.asStringValue();
if (value == null || !value.hasPrimitiveValue()) {
return null;
} else {
return hasTranslator() ? ((TranslationServices) getTranslator()).gt(value) : value.asStringValue();
}
}
public String egt(@SuppressWarnings("rawtypes") Enumeration<? extends Enum> value) {
return hasTranslator() ? ((TranslationServices) getTranslator()).egt(value) : value.asStringValue();
if (value == null || !value.hasPrimitiveValue()) {
return null;
} else {
return (value == null || !value.hasPrimitiveValue()) ? null : hasTranslator() ? ((TranslationServices) getTranslator()).egt(value) : value.asStringValue();
}
}