@Override public ResourceBundle newBundle( String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException { // only *.properties files can be aggregated. Other formats are delegated to the default implementation if ( !"java.properties".equals( format ) ) { return super.newBundle( baseName, locale, format, loader, reload ); } String resourceName = toBundleName( baseName, locale ) + ".properties"; Properties properties = load( resourceName, loader ); return properties.size() == 0 ? null : new AggregateResourceBundle( properties ); }
@Override public ResourceBundle newBundle( String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException { // only *.properties files can be aggregated. Other formats are delegated to the default implementation if ( !"java.properties".equals( format ) ) { return super.newBundle( baseName, locale, format, loader, reload ); } String resourceName = toBundleName( baseName, locale ) + ".properties"; Properties properties = load( resourceName, loader ); return properties.size() == 0 ? null : new AggregateResourceBundle( properties ); }