protected String getRequiredMessage ( final String [ ] messageKeys ) { MessageSourceResolvable resolvable = new MessageSourceResolvable ( ) { public String [ ] getCodes ( ) { return messageKeys ; } public Object [ ] getArguments ( ) { return null ; } public String getDefaultMessage ( ) { if ( messageKeys . length > 0 ) { return messageKeys [ 0 ] ; } return "" ; } } ; return getMessages ( ) . getMessage ( resolvable ) ; }
Get the message for the given key . Don t throw an exception if it s not found but return a default value .