[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-dev
Subject:    cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib WebdavResource.java
From:       jericho () apache ! org
Date:       2002-04-29 14:14:35
[Download RAW message or body]

jericho     02/04/29 07:14:33

  Modified:    src/webdav/client/src/org/apache/webdav/lib
                        WebdavResource.java
  Log:
  - Fix an error not returning WebdavState to be used by the method called for \
discovering lock.  
  Revision  Changes    Path
  1.41      +11 -10    \
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java  
  Index: WebdavResource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- WebdavResource.java	26 Apr 2002 15:57:18 -0000	1.40
  +++ WebdavResource.java	29 Apr 2002 14:14:32 -0000	1.41
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v \
                1.40 2002/04/26 15:57:18 jericho Exp $
  - * $Revision: 1.40 $
  - * $Date: 2002/04/26 15:57:18 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v \
1.41 2002/04/29 14:14:32 jericho Exp $  + * $Revision: 1.41 $
  + * $Date: 2002/04/29 14:14:32 $
    *
    * ====================================================================
    *
  @@ -3620,7 +3620,7 @@
           // Get the lock for the given path.
           WebdavState state = (WebdavState) client.getState();
           // Discover the locktoken from the given lock owner
  -        discoverLock(owner, path, state);
  +        state = discoverLock(owner, path, state);
           // Check the given path is alright.
           path = HttpURL.getPath(path);
           String lock = state.getLock(path);
  @@ -3651,23 +3651,24 @@
        * @param owner the activelock owner
        * @param path the path
        * @param state the state to save the locktoken
  -     * @return true, if the lock of the given owner is discovered
  +     * @return state probably having lock information renewly
        */
  -    public boolean discoverLock(String owner, String path, WebdavState state) {
  +    protected WebdavState discoverLock(String owner, String path,
  +            WebdavState state) {
  +
           if (lockDiscovery == null)
  -            return false;
  +            return state;
           Lock[] activeLocks = lockDiscovery.getActiveLocks();
           if (activeLocks == null)
  -            return false;
  +            return state;
           for (int i = 0; i < activeLocks.length; i++) {
               String activeLockOwner = activeLocks[i].getOwner();
               if (activeLockOwner.equals(owner)) {
                   String locktoken = activeLocks[i].getLockToken();
                   state.addLock(path, locktoken);
  -                return true;
               }
           }
  -        return false;
  +        return state;
       }
   
       
  
  
  

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic