Skip to content

Commit

Permalink
[FIX JENKINS-35381] Restrict ResourceBundleUtil (#2393)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck authored and oleg-nenashev committed Jun 7, 2016
1 parent 405c86a commit 9657629
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/main/java/jenkins/util/ResourceBundleUtil.java
Expand Up @@ -39,6 +39,7 @@
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a>
* @since 2.0
*/
@Restricted(NoExternalUse.class)
public class ResourceBundleUtil {

private static final Map<String, JSONObject> bundles = new ConcurrentHashMap<>();
Expand All @@ -52,7 +53,6 @@ private ResourceBundleUtil() {
* @return The bundle JSON.
* @throws MissingResourceException Missing resource bundle.
*/
@Restricted(NoExternalUse.class)
public static @Nonnull JSONObject getBundle(@Nonnull String baseName) throws MissingResourceException {
return getBundle(baseName, Locale.getDefault());
}
Expand All @@ -64,7 +64,6 @@ private ResourceBundleUtil() {
* @return The bundle JSON.
* @throws MissingResourceException Missing resource bundle.
*/
@Restricted(NoExternalUse.class)
public static @Nonnull JSONObject getBundle(@Nonnull String baseName, @Nonnull Locale locale) throws MissingResourceException {
String bundleKey = baseName + ":" + locale.toString();
JSONObject bundleJSON = bundles.get(bundleKey);
Expand Down

0 comments on commit 9657629

Please sign in to comment.