From b4015192bb770293777e2d8adbb9630b48773d0d Mon Sep 17 00:00:00 2001 From: markt Date: Sat, 2 May 2009 23:36:24 +0000 Subject: [PATCH] Clean up inspired by https://issues.apache.org/bugzilla/show_bug.cgi?id=47111 Remove unused code. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@771002 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/res/StringManager.java | 39 +--------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/java/org/apache/tomcat/util/res/StringManager.java b/java/org/apache/tomcat/util/res/StringManager.java index 44637c73b..1b6381f07 100644 --- a/java/org/apache/tomcat/util/res/StringManager.java +++ b/java/org/apache/tomcat/util/res/StringManager.java @@ -67,21 +67,12 @@ public class StringManager { * @param packageName Name of package to create StringManager for. */ private StringManager(String packageName) { - this( packageName, Locale.getDefault() ); - } - - private StringManager(String packageName, Locale loc) { String bundleName = packageName + ".LocalStrings"; - bundle = ResourceBundle.getBundle(bundleName, loc); + bundle = ResourceBundle.getBundle(bundleName, Locale.getDefault()); // Get the actual locale, which may be different from the requested one locale = bundle.getLocale(); } - private StringManager(ResourceBundle bundle ) { - this.bundle=bundle; - locale = bundle.getLocale(); - } - /** Get a string from the underlying resource bundle or return null if the String is not found. @@ -160,32 +151,4 @@ public class StringManager { return mgr; } - /** - * Get the StringManager for a particular package. If a manager for - * a package already exists, it will be reused, else a new - * StringManager will be created and returned. - * - * @param bundle The resource bundle - */ - public synchronized static StringManager getManager(ResourceBundle bundle) { - return new StringManager( bundle ); - } - - /** - * Get the StringManager for a particular package and Locale. If a manager for - * a package already exists, it will be reused, else a new - * StringManager will be created for that Locale and returned. - * - * @param packageName The package name - * @param loc The locale - */ - public synchronized static StringManager getManager(String packageName,Locale loc) { - StringManager mgr = managers.get(packageName+"_"+loc.toString()); - if (mgr == null) { - mgr = new StringManager(packageName,loc); - managers.put(packageName+"_"+loc.toString(), mgr); - } - return mgr; - } - } -- 2.11.0