tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r771002 - /tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java
Date Sat, 02 May 2009 23:36:24 GMT
Author: markt
Date: Sat May  2 23:36:24 2009
New Revision: 771002

URL: http://svn.apache.org/viewvc?rev=771002&view=rev
Log:
Clean up inspired by https://issues.apache.org/bugzilla/show_bug.cgi?id=47111
Remove unused code.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java?rev=771002&r1=771001&r2=771002&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java Sat May  2 23:36:24 2009
@@ -67,21 +67,12 @@
      * @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 @@
         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;
-    }
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message