/** Get a resource bundle the hard way. * @param baseName bundle basename * @param locale the locale to use (but still uses {@link #getBranding default branding}) * @param loader the class loader to use * @return the resource bundle * @exception MissingResourceException if the bundle does not exist */ public static ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader) throws MissingResourceException { if (USE_DEBUG_LOADER) { loader = DebugLoader.get(loader); } // Could more simply use ResourceBundle.getBundle (plus some special logic // with MergedBundle to handle branding) instead of manually finding bundles. // However this code is faster and has some other desirable properties. // Cf. #13847. ResourceBundle b = getBundleFast(baseName, locale, loader); if (b != null) { return b; } else { MissingResourceException e = new MissingResourceException("No such bundle " + baseName, baseName, null); // NOI18N if (Lookup.getDefault().lookup(ClassLoader.class) == null) { Exceptions.attachMessage(e, "Class loader not yet initialized in lookup"); // NOI18N } else { Exceptions.attachMessage(e, "Offending classloader: " + loader); // NOI18N } throw e; } }
/** Get a resource bundle the hard way. * @param baseName bundle basename * @param locale the locale to use (but still uses {@link #getBranding default branding}) * @param loader the class loader to use * @return the resource bundle * @exception MissingResourceException if the bundle does not exist */ public static final ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader) throws MissingResourceException { if (USE_DEBUG_LOADER) { loader = DebugLoader.get(loader); } // Could more simply use ResourceBundle.getBundle (plus some special logic // with MergedBundle to handle branding) instead of manually finding bundles. // However this code is faster and has some other desirable properties. // Cf. #13847. ResourceBundle b = getBundleFast(baseName, locale, loader); if (b != null) { return b; } else { MissingResourceException e = new MissingResourceException("No such bundle " + baseName, baseName, null); // NOI18N if (Lookup.getDefault().lookup(ClassLoader.class) == null) { Exceptions.attachMessage(e, "Class loader not yet initialized in lookup"); // NOI18N } else { Exceptions.attachMessage(e, "Offending classloader: " + loader); // NOI18N } throw e; } }
/** Get a resource bundle the hard way. * @param baseName bundle basename * @param locale the locale to use (but still uses {@link #getBranding default branding}) * @param loader the class loader to use * @return the resource bundle * @exception MissingResourceException if the bundle does not exist */ public static ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader) throws MissingResourceException { if (USE_DEBUG_LOADER) { loader = DebugLoader.get(loader); } // Could more simply use ResourceBundle.getBundle (plus some special logic // with MergedBundle to handle branding) instead of manually finding bundles. // However this code is faster and has some other desirable properties. // Cf. #13847. ResourceBundle b = getBundleFast(baseName, locale, loader); if (b != null) { return b; } else { MissingResourceException e = new MissingResourceException("No such bundle " + baseName, baseName, null); // NOI18N if (Lookup.getDefault().lookup(ClassLoader.class) == null) { Exceptions.attachMessage(e, "Class loader not yet initialized in lookup"); // NOI18N } else { Exceptions.attachMessage(e, "Offending classloader: " + loader); // NOI18N } throw e; } }
ResourceBundle b = getBundleFast(baseName, locale, loader); if (b != null) { return b;
ResourceBundle b = getBundleFast(baseName, locale, loader); if (b != null) { return b;