replaced Exception controll flow
This commit is contained in:
parent
594d77985d
commit
822b50b8d7
|
@ -146,18 +146,15 @@ public class BaseValidator {
|
|||
return thePass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected String formatMessage(String theMessage, Object... theMessageArguments) {
|
||||
String message;
|
||||
if (theMessageArguments != null && theMessageArguments.length > 0) {
|
||||
message = MessageFormat.format(messages.getString(theMessage), theMessageArguments);
|
||||
} else if (messages.containsKey(theMessage)) {
|
||||
message = messages.getString(theMessage);
|
||||
} else {
|
||||
try {
|
||||
message = messages.getString(theMessage);
|
||||
} catch (MissingResourceException e) {
|
||||
// non-internationalized String
|
||||
message = theMessage;
|
||||
}
|
||||
message = theMessage;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue