Static so sync on class object
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 19 Nov 2009 00:50:04 +0000 (00:50 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 19 Nov 2009 00:50:04 +0000 (00:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@882019 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/naming/java/javaURLContextFactory.java

index 76a302f..48729c1 100644 (file)
@@ -103,7 +103,7 @@ public class javaURLContextFactory
 
         // If the thread is not bound, return a shared writable context
         if (initialContext == null) {
-            synchronized(this) {
+            synchronized(getClass()) {
                 if (initialContext == null) {
                     initialContext = new NamingContext(
                             (Hashtable<String,Object>)environment, MAIN);