Clean up inspired by https://issues.apache.org/bugzilla/show_bug.cgi?id=47111
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 2 May 2009 23:36:24 +0000 (23:36 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 2 May 2009 23:36:24 +0000 (23:36 +0000)
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

index 44637c7..1b6381f 100644 (file)
@@ -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;
-    }
-
 }