tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1382526 - /tomcat/trunk/java/org/apache/naming/NamingContext.java
Date Sun, 09 Sep 2012 16:07:16 GMT
Author: markt
Date: Sun Sep  9 16:07:16 2012
New Revision: 1382526

URL: http://svn.apache.org/viewvc?rev=1382526&view=rev
Log:
Clean-up
 - final markers from UCDetector
 - refactor constructors to permit use of final

Modified:
    tomcat/trunk/java/org/apache/naming/NamingContext.java

Modified: tomcat/trunk/java/org/apache/naming/NamingContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/NamingContext.java?rev=1382526&r1=1382525&r2=1382526&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/NamingContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/NamingContext.java Sun Sep  9 16:07:16 2012
@@ -70,7 +70,16 @@ public class NamingContext implements Co
      */
     public NamingContext(Hashtable<String,Object> env, String name)
         throws NamingException {
-        this.bindings = new HashMap<>();
+        this(env, name, new HashMap<String,NamingEntry>());
+    }
+
+
+    /**
+     * Builds a naming context using the given environment.
+     */
+    public NamingContext(Hashtable<String,Object> env, String name,
+            HashMap<String,NamingEntry> bindings) throws NamingException {
+
         this.env = new Hashtable<>();
         // FIXME ? Could be put in the environment ?
         this.name = name;
@@ -82,16 +91,6 @@ public class NamingContext implements Co
                 addToEnvironment(entryName, env.get(entryName));
             }
         }
-    }
-
-
-    /**
-     * Builds a naming context using the given environment.
-     */
-    public NamingContext(Hashtable<String,Object> env, String name,
-            HashMap<String,NamingEntry> bindings)
-        throws NamingException {
-        this(env, name);
         this.bindings = bindings;
     }
 
@@ -114,7 +113,7 @@ public class NamingContext implements Co
     /**
      * Bindings in this Context.
      */
-    protected HashMap<String,NamingEntry> bindings;
+    protected final HashMap<String,NamingEntry> bindings;
 
 
     /**



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


Mime
View raw message