Hi,

I propose the following change in executeRequest in PropFindMethod.java:

...
                   if (depth > 0) // proposed change
                   {
                      // existing code
                     Enumeration enum = null;

                     try {
                         enum = structure.getChildren(slideToken, cur);
                     } catch (StructureException e) {
                         e.printStackTrace();
                         
resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
                         throw new WebdavException
                             (WebdavStatus.SC_INTERNAL_SERVER_ERROR);
                     } catch (ServiceAccessException e) {
                         e.printStackTrace();
                         
resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
                         throw new WebdavException
                             (WebdavStatus.SC_INTERNAL_SERVER_ERROR);
                     }

                     while (enum.hasMoreElements()) {
                         stackBelow.push(enum.nextElement());
                     }
                   }
...

While the child information of the leaves is not used, there is no need 
to query it. Please correct me if I am wrong.
In my case the number of queries to be executed on the database reduces 
dramatically.

Regards, Nelis

Reply via email to