* @return the resolved message, or <code>null</code> if not found
* @see #getParentMessageSource()
*/
protected String getMessageFromParent(String code, Object[] args,
Locale locale) {
I18nService parent = getParentMessageSource();
if (parent != null) {
if (parent instanceof AbstractI18nService) {
// Call support method to avoid getting the default code back
// in case of "useCodeAsDefaultMessage" being activated.
return ((AbstractI18nService) parent).getMessageInternal(
code, args, locale);
} else {
// Check parent MessageSource, returning null if not found
// there.
return parent.getMessage(code, args, null, locale);
}
}
// Not found in parent either.
return null;
}