jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1149069 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java
Date Thu, 21 Jul 2011 08:30:14 GMT
Author: angela
Date: Thu Jul 21 08:30:12 2011
New Revision: 1149069

URL: http://svn.apache.org/viewvc?rev=1149069&view=rev
Log:
JCR-3004 - Check if a DAV-Request has a Label in the header, before checking if it's version-controlled
(patch provided by christian stocker)

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java?rev=1149069&r1=1149068&r2=1149069&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DavResourceFactoryImpl.java
Thu Jul 21 08:30:12 2011
@@ -105,9 +105,9 @@ public class DavResourceFactoryImpl impl
                 /* if the created resource is version-controlled and the request
                 contains a Label header, the corresponding Version must be used
                 instead.*/
-                if (request instanceof DeltaVServletRequest && versionable &&
isVersionControlled(resource)) {
+                if (request instanceof DeltaVServletRequest && versionable) {
                     String labelHeader = ((DeltaVServletRequest)request).getLabel();
-                    if (labelHeader != null && DavMethods.isMethodAffectedByLabel(request))
{
+                    if (labelHeader != null && DavMethods.isMethodAffectedByLabel(request)
&& isVersionControlled(resource)) {
                         Version v = ((Node)item).getVersionHistory().getVersionByLabel(labelHeader);
                         DavResourceLocator vloc = locator.getFactory().createResourceLocator(locator.getPrefix(),
locator.getWorkspacePath(), v.getPath(), false);
                         resource =  new VersionItemCollection(vloc, session, this, v);
@@ -227,4 +227,4 @@ public class DavResourceFactoryImpl impl
         }
         return vc;
     }
-}
\ No newline at end of file
+}



Mime
View raw message