juergen     2002/06/24 00:43:56

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        VersioningHelper.java
  Log:
  Fixed bug in method versionControl(resourcePath, existingVersionPath):
  If the parameter existingVersionPath did not identify a version, a 
IllegalStateException was thrown instead of the expected 
PreconditionViolationException.
  (ralf)
  
  Revision  Changes    Path
  1.57      +7 -3      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
  
  Index: VersioningHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- VersioningHelper.java     21 Jun 2002 08:09:12 -0000      1.56
  +++ VersioningHelper.java     24 Jun 2002 07:43:56 -0000      1.57
  @@ -370,6 +370,10 @@
           
           UriHandler rUh = UriHandler.getUriHandler( resourcePath );
           UriHandler evUh = UriHandler.getUriHandler( existingVersionPath );
  +        if ( ! evUh.isVersionUri() ) {
  +            throw new PreconditionViolationException(
  +                new ViolatedPrecondition(C_MUST_BE_VERSION, 
WebdavStatus.SC_CONFLICT), resourcePath);
  +        }
           NodeRevisionNumber evNrn = new NodeRevisionNumber( evUh.getVersionName() );
           NodeRevisionDescriptors rNrds = null;
           NodeRevisionDescriptor rNrd = null;
  
  
  

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

Reply via email to