Fix FHIRPath message for HAPI Test Case

An Invalid FHIRPath message is tested in HAPI-FHIR FhirPathFilterInterceptorTest.testFilteredResponse_ExpressionIsInvalid()
This commit is contained in:
dotasek 2023-01-25 11:09:34 -05:00
parent 61e63b128a
commit 3ff9b9e937
2 changed files with 3 additions and 1 deletions

View File

@ -299,6 +299,8 @@ public interface IWorkerContext {
String formatMessage(String theMessage, Object... theMessageArguments); String formatMessage(String theMessage, Object... theMessageArguments);
String formatMessagePlural(Integer pl, String theMessage, Object... theMessageArguments);
void setValidationMessageLanguage(Locale locale); void setValidationMessageLanguage(Locale locale);
public class ValidationResult { public class ValidationResult {

View File

@ -575,7 +575,7 @@ public class FHIRPathEngine {
} }
private FHIRException makeExceptionPlural(Integer num, ExpressionNode holder, String constName, Object... args) { private FHIRException makeExceptionPlural(Integer num, ExpressionNode holder, String constName, Object... args) {
String fmt = worker.formatMessage(constName, args); String fmt = worker.formatMessagePlural(num, constName, args);
if (location != null) { if (location != null) {
fmt = fmt + " "+worker.formatMessage(I18nConstants.FHIRPATH_LOCATION, location); fmt = fmt + " "+worker.formatMessage(I18nConstants.FHIRPATH_LOCATION, location);
} }