@Override protected MessageFormat resolveCode(String code, Locale locale, String defaultMessage) { CacheTagUtils.tag(Message.class); MessageBundleEntry entry = getEntry(code, defaultMessage); Message message = getMessage(entry, locale); if (message != null) { return message.getMessageFormat(escapeSingleQuotes); } return null; }
@Override protected String getMessageFromParent(String code, Object[] args, Locale locale) { String s = super.getMessageFromParent(code, args, locale); if (s == null) { MessageBundleEntry entry = MessageBundleEntry.loadByBundleAndCode(bundle, code); Message message = entry.getDefaultMessage(); if (message != null) { if (args != null) { MessageFormat messageFormat = message.getMessageFormat(escapeSingleQuotes); if (messageFormat != null) { synchronized (messageFormat) { return messageFormat.format(args); } } } else { return message.getText(); } } } return s; }