code: public String getWithDefault(String code, String defaultMessage, Object... arguments) {
          try {
              return getMessage(code, null, arguments);
          } catch (NoSuchMessageException ex) {
              return defaultMessage;
          }
      }
docs: Tries to resolve the specified message for the current locale.
  
  @param code the code to lookup up, such as 'calculator.noRateSet', never {@code null}.
  @param defaultMessage string to return if the lookup fails, never {@code null}.
  @param arguments Array of arguments that will be filled in for params within the message (params look like "{0}",
  "{1,date}", "{2,time}"), or {@code null} if none.
  @return the resolved message, or the {@code defaultMessage} if the lookup fails.
  @see #getLocale()