Skip to content

Commit 3d45243

Browse files
authored
use class loader on master (#3039)
1 parent 5b44219 commit 3d45243

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/graphql/i18n/I18n.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ protected I18n(BundleType bundleType, Locale locale) {
4141
assertNotNull(bundleType);
4242
assertNotNull(locale);
4343
this.locale = locale;
44-
this.resourceBundle = ResourceBundle.getBundle(bundleType.baseName, locale);
45-
}
44+
// load the resource bundle with this classes class loader - to help avoid confusion in complicated worlds
45+
// like OSGI
46+
this.resourceBundle = ResourceBundle.getBundle(bundleType.baseName, locale, I18n.class.getClassLoader()); }
4647

4748
public Locale getLocale() {
4849
return locale;

0 commit comments

Comments
 (0)