MCPcopy Create free account
hub / github.com/ReadyTalk/avian / getBundle

Method getBundle

classpath/java/util/ResourceBundle.java:65–94  ·  view source on GitHub ↗
(String name, Locale locale,
                                         ClassLoader loader)

Source from the content-addressed store, hash-verified

63 }
64
65 public static ResourceBundle getBundle(String name, Locale locale,
66 ClassLoader loader)
67 {
68 try {
69 ResourceBundle b = find(name, loader, null);
70
71 if (locale.getLanguage() != null) {
72 name = name + "_" + locale.getLanguage();
73 ResourceBundle b2 = find(name, loader, b);
74 if (b2 != null) b = b2;
75
76 if (locale.getCountry() != null) {
77 name = name + "_" + locale.getCountry();
78 b2 = find(name, loader, b);
79 if (b2 != null) b = b2;
80
81 if (locale.getVariant() != null) {
82 name = name + "_" + locale.getVariant();
83 b2 = find(name, loader, b);
84 if (b2 != null) b = b2;
85 }
86 }
87 }
88 return b;
89 } catch (Exception e) {
90 RuntimeException re = new MissingResourceException(name, name, null);
91 re.initCause(e);
92 throw re;
93 }
94 }
95
96 public static ResourceBundle getBundle(String name, Locale locale) {
97 return getBundle(name, locale, Method.getCaller().class_.loader);

Callers

nothing calls this directly

Calls 7

findMethod · 0.95
getCallerMethod · 0.95
getDefaultMethod · 0.95
getCountryMethod · 0.80
getVariantMethod · 0.80
initCauseMethod · 0.80
getLanguageMethod · 0.45

Tested by

no test coverage detected