fixed MessageFormat.format for messages without arguments
removed duplicage entry from property file
This commit is contained in:
parent
446c9462a0
commit
ba5eea6774
|
@ -53,6 +53,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hl7.fhir.dstu3.model.Resource;
|
||||
|
@ -151,8 +152,13 @@ public class BaseValidator {
|
|||
if (theMessageArguments != null && theMessageArguments.length > 0) {
|
||||
message = MessageFormat.format(messages.getString(theMessage), theMessageArguments);
|
||||
} else {
|
||||
try {
|
||||
message = messages.getString(theMessage);
|
||||
} catch (MissingResourceException e) {
|
||||
// non-internationalized String
|
||||
message = theMessage;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
|
|
|
@ -1818,7 +1818,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
warning(errors, IssueType.INVALID, e.line(), e.col(), path, yearIsValid(e.primitiveValue()), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_DATETIME_REASONABLE, e.primitiveValue());
|
||||
rule(errors, IssueType.INVALID, e.line(), e.col(), path,
|
||||
e.primitiveValue()
|
||||
.matches("([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?"), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_DATETIME_VALID);
|
||||
.matches("([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?"), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_DATETIME_VALID, e.primitiveValue());
|
||||
rule(errors, IssueType.INVALID, e.line(), e.col(), path, !hasTime(e.primitiveValue()) || hasTimeZone(e.primitiveValue()), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_DATETIME_TZ);
|
||||
rule(errors, IssueType.INVALID, e.line(), e.col(), path, !context.hasMaxLength() || context.getMaxLength() == 0 || e.primitiveValue().length() <= context.getMaxLength(), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_PRIMITIVE_LENGTH, context.getMaxLength());
|
||||
try {
|
||||
|
|
|
@ -166,7 +166,6 @@ Terminology_TX_ValueSet_NotFound2 = ValueSet {0} not found by validator
|
|||
Type_Specific_Checks_DT_Base64_Valid = The value '{0}' is not a valid Base64 value
|
||||
Type_Specific_Checks_DT_Boolean_Value = boolean values must be 'true' or 'false'
|
||||
Type_Specific_Checks_DT_Code_WS = The code '{0}' is not valid (whitespace rules)
|
||||
Type_Specific_Checks_DT_DateTIme_Valid = Not a valid date time
|
||||
Type_Specific_Checks_DT_DateTime_Reasonable = The value '{0}' is outside the range of reasonable years - check for data entry error
|
||||
Type_Specific_Checks_DT_DateTime_Regex = The instant '{0}' is not valid (by regex)
|
||||
Type_Specific_Checks_DT_DateTime_TZ = if a date has a time, it must have a timezone
|
||||
|
|
|
@ -166,7 +166,6 @@ Terminology_TX_ValueSet_NotFound2 = ValueSet {0} not found by validator
|
|||
Type_Specific_Checks_DT_Base64_Valid = The value '{0}' is not a valid Base64 value
|
||||
Type_Specific_Checks_DT_Boolean_Value = boolean values must be 'true' or 'false'
|
||||
Type_Specific_Checks_DT_Code_WS = The code '{0}' is not valid (whitespace rules)
|
||||
Type_Specific_Checks_DT_DateTIme_Valid = Not a valid date time
|
||||
Type_Specific_Checks_DT_DateTime_Reasonable = The value '{0}' is outside the range of reasonable years - check for data entry error
|
||||
Type_Specific_Checks_DT_DateTime_Regex = The instant '{0}' is not valid (by regex)
|
||||
Type_Specific_Checks_DT_DateTime_TZ = if a date has a time, it must have a timezone
|
||||
|
|
Loading…
Reference in New Issue