ResourceBundle (@NotNull String baseName, @NotNull Class<?> formClass) { ResourceBundle rb = getResourceBundle(formClass.getClassLoader(), baseName); if (!BundleBase.SHOW_LOCALIZED_MESSAGES) { return rb; } return new ResourceBundle() { @Override protected Object handleGetObject(@NotNull String key) { Object get = rb.getObject(key); assert get instanceof String : "Language bundles should contain only strings"; return BundleBase.appendLocalizationSuffix((String)get, BundleBase.L10N_MARKER); } @Override public @NotNull Enumeration<String> getKeys() { return rb.getKeys(); } }; }