remm        2005/03/21 07:37:10

  Modified:    util/java/org/apache/tomcat/util/http/mapper Mapper.java
  Log:
  - Fix sync block placement.
  
  Revision  Changes    Path
  1.44      +9 -9      
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java
  
  Index: Mapper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Mapper.java       29 Aug 2004 17:14:42 -0000      1.43
  +++ Mapper.java       21 Mar 2005 15:37:10 -0000      1.44
  @@ -183,13 +183,13 @@
           }
           Host host = hosts[pos];
           if (host.name.equals(hostName)) {
  -            Context[] contexts = host.contextList.contexts;
  -            // Update nesting
               int slashCount = slashCount(path);
  -            if (slashCount > host.contextList.nesting) {
  -                host.contextList.nesting = slashCount;
  -            }
               synchronized (host) {
  +                Context[] contexts = host.contextList.contexts;
  +                // Update nesting
  +                if (slashCount > host.contextList.nesting) {
  +                    host.contextList.nesting = slashCount;
  +                }
                   Context[] newContexts = new Context[contexts.length + 1];
                   Context newContext = new Context();
                   newContext.name = path;
  @@ -219,11 +219,11 @@
           }
           Host host = hosts[pos];
           if (host.name.equals(hostName)) {
  -            Context[] contexts = host.contextList.contexts;
  -            if( contexts.length == 0 ){
  -                return;
  -            }
               synchronized (host) {
  +                Context[] contexts = host.contextList.contexts;
  +                if( contexts.length == 0 ){
  +                    return;
  +                }
                   Context[] newContexts = new Context[contexts.length - 1];
                   if (removeMap(contexts, newContexts, path)) {
                       host.contextList.contexts = newContexts;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to