tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets WebdavServlet.java
Date Mon, 01 Apr 2002 18:17:43 GMT
remm        02/04/01 10:17:43

  Modified:    catalina/src/share/org/apache/catalina/servlets Tag:
                        tomcat_40_branch WebdavServlet.java
  Log:
  - Avoid doing unecessary lists operations.
  - Patch submitted by Ewout Prangsma <e.prangsma at daisysoftware.com>.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.2  +25 -24    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
  
  Index: WebdavServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
  retrieving revision 1.25.2.1
  retrieving revision 1.25.2.2
  diff -u -r1.25.2.1 -r1.25.2.2
  --- WebdavServlet.java	3 Jan 2002 10:44:32 -0000	1.25.2.1
  +++ WebdavServlet.java	1 Apr 2002 18:17:43 -0000	1.25.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
1.25.2.1 2002/01/03 10:44:32 remm Exp $
  - * $Revision: 1.25.2.1 $
  - * $Date: 2002/01/03 10:44:32 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
1.25.2.2 2002/04/01 18:17:43 remm Exp $
  + * $Revision: 1.25.2.2 $
  + * $Date: 2002/04/01 18:17:43 $
    *
    * ====================================================================
    *
  @@ -126,7 +126,7 @@
    * are handled by the DefaultServlet.
    *
    * @author Remy Maucherat
  - * @version $Revision: 1.25.2.1 $ $Date: 2002/01/03 10:44:32 $
  + * @version $Revision: 1.25.2.2 $ $Date: 2002/04/01 18:17:43 $
    */
   
   public class WebdavServlet
  @@ -591,7 +591,9 @@
                   } catch (NamingException e) {
                       continue;
                   }
  -                if (object instanceof DirContext) {
  +
  +                if ((object instanceof DirContext) && (depth > 0)) {
  +
                       try {
                           NamingEnumeration enum = resources.list(currentPath);
                           while (enum.hasMoreElements()) {
  @@ -610,27 +612,26 @@
                           return;
                       }
   
  -                    if (depth > 0) {
  -                        // Displaying the lock-null resources present in that
  -                        // collection
  -                        String lockPath = currentPath;
  -                        if (lockPath.endsWith("/"))
  -                            lockPath = 
  -                                lockPath.substring(0, lockPath.length() - 1);
  -                        Vector currentLockNullResources =
  -                            (Vector) lockNullResources.get(lockPath);
  -                        if (currentLockNullResources != null) {
  -                            Enumeration lockNullResourcesList =
  -                                currentLockNullResources.elements();
  -                            while (lockNullResourcesList.hasMoreElements()) {
  -                                String lockNullPath = (String)
  -                                    lockNullResourcesList.nextElement();
  -                                parseLockNullProperties
  -                                    (req, generatedXML, lockNullPath, type,
  -                                     properties);
  -                            }
  +                    // Displaying the lock-null resources present in that
  +                    // collection
  +                    String lockPath = currentPath;
  +                    if (lockPath.endsWith("/"))
  +                        lockPath = 
  +                            lockPath.substring(0, lockPath.length() - 1);
  +                    Vector currentLockNullResources =
  +                        (Vector) lockNullResources.get(lockPath);
  +                    if (currentLockNullResources != null) {
  +                        Enumeration lockNullResourcesList =
  +                            currentLockNullResources.elements();
  +                        while (lockNullResourcesList.hasMoreElements()) {
  +                            String lockNullPath = (String)
  +                                lockNullResourcesList.nextElement();
  +                            parseLockNullProperties
  +                                (req, generatedXML, lockNullPath, type,
  +                                 properties);
                           }
                       }
  +
                   }
   
                   if (stack.isEmpty()) {
  
  
  

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


Mime
View raw message