You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2012/10/31 15:06:13 UTC

svn commit: r1404144 [5/5] - in /jackrabbit/branches/2.2: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/management/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/observation/ jac...

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java Wed Oct 31 14:06:06 2012
@@ -1,166 +1,166 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.jcr2spi;
-
-import javax.jcr.ItemExistsException;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
-import org.apache.jackrabbit.test.AbstractJCRTest;
-import org.apache.jackrabbit.test.NotExecutableException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderTest</code>...
- */
-public class ReorderTest extends AbstractJCRTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderTest.class);
-
-    protected Node child1;
-    protected Node child2;
-    protected Node child3;
-    protected Node child4;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        if (!testRootNode.getPrimaryNodeType().hasOrderableChildNodes()) {
-            throw new NotExecutableException("Test node does not have orderable children.");
-        }
-        NodeIterator it = testRootNode.getNodes();
-        if (it.hasNext()) {
-            throw new NotExecutableException("Test node already contains child nodes");
-        }
-        createOrderableChildren();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        child1 = null;
-        child2 = null;
-        child3 = null;
-        child4 = null;
-        super.tearDown();
-    }
-
-    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException, NotExecutableException {
-        child1 = testRootNode.addNode(nodeName1, testNodeType);
-        child2 = testRootNode.addNode(nodeName2, testNodeType);
-        child3 = testRootNode.addNode(nodeName3, testNodeType);
-        child4 = testRootNode.addNode(nodeName4, testNodeType);
-
-        testRootNode.save();
-    }
-
-    protected static String getRelPath(Node child) throws RepositoryException {
-        if (child == null) {
-            return null;
-        }
-        String path = child.getPath();
-        return path.substring(path.lastIndexOf('/')+1);
-    }
-
-    protected static void testOrder(Node parent, Node[] children) throws RepositoryException {
-        NodeIterator it = parent.getNodes();
-        int i = 0;
-        while (it.hasNext()) {
-            Node child = it.nextNode();
-            if (i >= children.length) {
-                fail("Reorder added a child node.");
-            }
-            assertTrue("Wrong order of children: " + child + " is not the same as " + children[i], child.isSame(children[i]));
-            i++;
-        }
-
-        if (i < children.length-1) {
-            fail("Reorder removed a child node.");
-        }
-    }
-
-    public void testReorder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child1), getRelPath(child3));
-        testOrder(testRootNode, new Node[] { child2, child1, child3, child4});
-
-        testRootNode.save();
-        testOrder(testRootNode, new Node[] { child2, child1, child3, child4});
-    }
-
-    public void testReorderToEnd() throws RepositoryException, ConstraintViolationException, UnsupportedRepositoryOperationException, VersionException {
-        testRootNode.orderBefore(getRelPath(child2), null);
-        testOrder(testRootNode, new Node[] { child1, child3, child4, child2});
-
-        testRootNode.save();
-        testOrder(testRootNode, new Node[] { child1, child3, child4, child2});
-    }
-
-    public void testRevertReorder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
-        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
-
-        testRootNode.refresh(false);
-        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
-    }
-
-    public void testRevertReorderToEnd() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child1), null);
-        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
-
-        testRootNode.refresh(false);
-        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
-    }
-
-    public void testReorder2() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child3), getRelPath(child1));
-        testRootNode.save();
-
-        Session otherSession = getHelper().getReadOnlySession();
-        try {
-            testOrder((Node) otherSession.getItem(testRootNode.getPath()), new Node[] {child3, child1, child2, child4});
-        } finally {
-            otherSession.logout();
-        }
-    }
-
-    public void testReorderTwice() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child2), null);
-        testRootNode.orderBefore(getRelPath(child4), getRelPath(child1));
-
-        testOrder(testRootNode, new Node[] { child4, child1, child3, child2});
-        testRootNode.save();
-        testOrder(testRootNode, new Node[] { child4, child1, child3, child2});
-    }
-
-    public void testReorderFinallyOriginalOrder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child4), getRelPath(child1));
-        testRootNode.orderBefore(getRelPath(child3), getRelPath(child4));
-        testRootNode.orderBefore(getRelPath(child2), getRelPath(child3));
-        testRootNode.orderBefore(getRelPath(child1), getRelPath(child2));
-
-        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
-        testRootNode.save();
-        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.jcr2spi;
+
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderTest</code>...
+ */
+public class ReorderTest extends AbstractJCRTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderTest.class);
+
+    protected Node child1;
+    protected Node child2;
+    protected Node child3;
+    protected Node child4;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        if (!testRootNode.getPrimaryNodeType().hasOrderableChildNodes()) {
+            throw new NotExecutableException("Test node does not have orderable children.");
+        }
+        NodeIterator it = testRootNode.getNodes();
+        if (it.hasNext()) {
+            throw new NotExecutableException("Test node already contains child nodes");
+        }
+        createOrderableChildren();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        child1 = null;
+        child2 = null;
+        child3 = null;
+        child4 = null;
+        super.tearDown();
+    }
+
+    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException, NotExecutableException {
+        child1 = testRootNode.addNode(nodeName1, testNodeType);
+        child2 = testRootNode.addNode(nodeName2, testNodeType);
+        child3 = testRootNode.addNode(nodeName3, testNodeType);
+        child4 = testRootNode.addNode(nodeName4, testNodeType);
+
+        testRootNode.save();
+    }
+
+    protected static String getRelPath(Node child) throws RepositoryException {
+        if (child == null) {
+            return null;
+        }
+        String path = child.getPath();
+        return path.substring(path.lastIndexOf('/')+1);
+    }
+
+    protected static void testOrder(Node parent, Node[] children) throws RepositoryException {
+        NodeIterator it = parent.getNodes();
+        int i = 0;
+        while (it.hasNext()) {
+            Node child = it.nextNode();
+            if (i >= children.length) {
+                fail("Reorder added a child node.");
+            }
+            assertTrue("Wrong order of children: " + child + " is not the same as " + children[i], child.isSame(children[i]));
+            i++;
+        }
+
+        if (i < children.length-1) {
+            fail("Reorder removed a child node.");
+        }
+    }
+
+    public void testReorder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child1), getRelPath(child3));
+        testOrder(testRootNode, new Node[] { child2, child1, child3, child4});
+
+        testRootNode.save();
+        testOrder(testRootNode, new Node[] { child2, child1, child3, child4});
+    }
+
+    public void testReorderToEnd() throws RepositoryException, ConstraintViolationException, UnsupportedRepositoryOperationException, VersionException {
+        testRootNode.orderBefore(getRelPath(child2), null);
+        testOrder(testRootNode, new Node[] { child1, child3, child4, child2});
+
+        testRootNode.save();
+        testOrder(testRootNode, new Node[] { child1, child3, child4, child2});
+    }
+
+    public void testRevertReorder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
+        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
+
+        testRootNode.refresh(false);
+        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
+    }
+
+    public void testRevertReorderToEnd() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child1), null);
+        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
+
+        testRootNode.refresh(false);
+        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
+    }
+
+    public void testReorder2() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child3), getRelPath(child1));
+        testRootNode.save();
+
+        Session otherSession = getHelper().getReadOnlySession();
+        try {
+            testOrder((Node) otherSession.getItem(testRootNode.getPath()), new Node[] {child3, child1, child2, child4});
+        } finally {
+            otherSession.logout();
+        }
+    }
+
+    public void testReorderTwice() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child2), null);
+        testRootNode.orderBefore(getRelPath(child4), getRelPath(child1));
+
+        testOrder(testRootNode, new Node[] { child4, child1, child3, child2});
+        testRootNode.save();
+        testOrder(testRootNode, new Node[] { child4, child1, child3, child2});
+    }
+
+    public void testReorderFinallyOriginalOrder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child4), getRelPath(child1));
+        testRootNode.orderBefore(getRelPath(child3), getRelPath(child4));
+        testRootNode.orderBefore(getRelPath(child2), getRelPath(child3));
+        testRootNode.orderBefore(getRelPath(child1), getRelPath(child2));
+
+        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
+        testRootNode.save();
+        testOrder(testRootNode, new Node[] { child1, child2, child3, child4});
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/version/LabelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/version/LabelTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/version/LabelTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/version/LabelTest.java Wed Oct 31 14:06:06 2012
@@ -1,77 +1,77 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.jcr2spi.version;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.version.Version;
-
-import org.apache.jackrabbit.test.api.version.VersionLabelTest;
-
-public class LabelTest extends VersionLabelTest {
-
-    public void testRemovedLabel2() throws RepositoryException {
-        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
-        vHistory.removeVersionLabel(versionLabel);
-
-        List<String> labels = Arrays.asList(vHistory.getVersionLabels());
-        assertFalse("VersionHistory.getVersionLabels() must not return a removed label.",labels.contains(versionLabel));
-    }
-
-    public void testRemovedLabel3() throws RepositoryException {
-        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
-        vHistory.removeVersionLabel(versionLabel);
-
-        List<String> labels = Arrays.asList(vHistory.getVersionLabels(rootVersion));
-        assertFalse("VersionHistory.getVersionLabels(Version) must not return a removed label.",labels.contains(versionLabel));
-    }
-
-    public void testMoveLabel2() throws RepositoryException {
-        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
-
-        versionableNode.checkout();
-        Version v = versionableNode.checkin();
-        vHistory.addVersionLabel(v.getName(), versionLabel, true);
-
-        List<String> labels = Arrays.asList(vHistory.getVersionLabels(v));
-        assertTrue(labels.contains(versionLabel));
-    }
-
-    public void testMoveLabel3() throws RepositoryException {
-        versionableNode.checkout();
-        Version v = versionableNode.checkin();
-
-        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
-        vHistory.addVersionLabel(v.getName(), versionLabel, true);
-
-        List<String> labels = Arrays.asList(vHistory.getVersionLabels(rootVersion));
-        assertFalse(labels.contains(versionLabel));
-    }
-
-    public void testMoveLabel4() throws RepositoryException {
-        versionableNode.checkout();
-        Version v = versionableNode.checkin();
-
-        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
-        vHistory.addVersionLabel(v.getName(), versionLabel, true);
-
-        Version v2 = vHistory.getVersionByLabel(versionLabel);
-        assertTrue(v2.isSame(v));
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.jcr2spi.version;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.version.Version;
+
+import org.apache.jackrabbit.test.api.version.VersionLabelTest;
+
+public class LabelTest extends VersionLabelTest {
+
+    public void testRemovedLabel2() throws RepositoryException {
+        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+        vHistory.removeVersionLabel(versionLabel);
+
+        List<String> labels = Arrays.asList(vHistory.getVersionLabels());
+        assertFalse("VersionHistory.getVersionLabels() must not return a removed label.",labels.contains(versionLabel));
+    }
+
+    public void testRemovedLabel3() throws RepositoryException {
+        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+        vHistory.removeVersionLabel(versionLabel);
+
+        List<String> labels = Arrays.asList(vHistory.getVersionLabels(rootVersion));
+        assertFalse("VersionHistory.getVersionLabels(Version) must not return a removed label.",labels.contains(versionLabel));
+    }
+
+    public void testMoveLabel2() throws RepositoryException {
+        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+
+        versionableNode.checkout();
+        Version v = versionableNode.checkin();
+        vHistory.addVersionLabel(v.getName(), versionLabel, true);
+
+        List<String> labels = Arrays.asList(vHistory.getVersionLabels(v));
+        assertTrue(labels.contains(versionLabel));
+    }
+
+    public void testMoveLabel3() throws RepositoryException {
+        versionableNode.checkout();
+        Version v = versionableNode.checkin();
+
+        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+        vHistory.addVersionLabel(v.getName(), versionLabel, true);
+
+        List<String> labels = Arrays.asList(vHistory.getVersionLabels(rootVersion));
+        assertFalse(labels.contains(versionLabel));
+    }
+
+    public void testMoveLabel4() throws RepositoryException {
+        versionableNode.checkout();
+        Version v = versionableNode.checkin();
+
+        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
+        vHistory.addVersionLabel(v.getName(), versionLabel, true);
+
+        Version v2 = vHistory.getVersionByLabel(versionLabel);
+        assertTrue(v2.isSame(v));
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/version/LabelTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/IdentifierResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/BoundedIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Transformer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/HashCache.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java Wed Oct 31 14:06:06 2012
@@ -1,66 +1,66 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.spi.commons.namespace;
-
-import javax.jcr.NamespaceException;
-import javax.jcr.NamespaceRegistry;
-import javax.jcr.RepositoryException;
-
-/**
- * Namespace resolver based on the repository-wide namespace mappings
- * stored in a namespace registry.
- */
-public class RegistryNamespaceResolver implements NamespaceResolver {
-
-    /**
-     * Namespace registry
-     */
-    private final NamespaceRegistry registry;
-
-    /**
-     * Creates a new namespace resolver based on the given namespace registry.
-     * 
-     * @param registry namespace registry
-     */
-    public RegistryNamespaceResolver(NamespaceRegistry registry) {
-        this.registry = registry;
-    }
-
-    public String getPrefix(String uri) throws NamespaceException {
-        try {
-            return registry.getPrefix(uri);
-        } catch (RepositoryException e) {
-            if (!(e instanceof NamespaceException)) {
-                e = new NamespaceException(
-                        "Failed to resolve namespace URI: " + uri, e);
-            }
-            throw (NamespaceException) e;
-        }
-    }
-
-    public String getURI(String prefix) throws NamespaceException {
-        try {
-            return registry.getURI(prefix);
-        } catch (RepositoryException e) {
-            if (!(e instanceof NamespaceException)) {
-                e = new NamespaceException(
-                        "Failed to resolve namespace prefix: " + prefix, e);
-            }
-            throw (NamespaceException) e;
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.spi.commons.namespace;
+
+import javax.jcr.NamespaceException;
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.RepositoryException;
+
+/**
+ * Namespace resolver based on the repository-wide namespace mappings
+ * stored in a namespace registry.
+ */
+public class RegistryNamespaceResolver implements NamespaceResolver {
+
+    /**
+     * Namespace registry
+     */
+    private final NamespaceRegistry registry;
+
+    /**
+     * Creates a new namespace resolver based on the given namespace registry.
+     * 
+     * @param registry namespace registry
+     */
+    public RegistryNamespaceResolver(NamespaceRegistry registry) {
+        this.registry = registry;
+    }
+
+    public String getPrefix(String uri) throws NamespaceException {
+        try {
+            return registry.getPrefix(uri);
+        } catch (RepositoryException e) {
+            if (!(e instanceof NamespaceException)) {
+                e = new NamespaceException(
+                        "Failed to resolve namespace URI: " + uri, e);
+            }
+            throw (NamespaceException) e;
+        }
+    }
+
+    public String getURI(String prefix) throws NamespaceException {
+        try {
+            return registry.getURI(prefix);
+        } catch (RepositoryException e) {
+            if (!(e instanceof NamespaceException)) {
+                e = new NamespaceException(
+                        "Failed to resolve namespace prefix: " + prefix, e);
+            }
+            throw (NamespaceException) e;
+        }
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeTypeManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/StringCache.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/conversion/DummyIdentifierResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/nodetype/TestAll.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/query/sql2/ParserTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/value/ValueFormatTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/QValueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/core/SetBinaryProperty.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java Wed Oct 31 14:06:06 2012
@@ -1,71 +1,71 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.standalone.cli.ext;
-
-import javax.jcr.Repository;
-import javax.naming.InitialContext;
-
-import org.apache.commons.chain.Command;
-import org.apache.commons.chain.Context;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jackrabbit.rmi.client.ClientAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.jackrabbit.standalone.cli.CommandHelper;
-
-/**
- * Connect to a JCR-RMI server
- */
-public class ConnectToJNDIServer implements Command {
-	/** logger */
-	private static Log log = LogFactory.getLog(ConnectToJNDIServer.class);
-
-	// ---------------------------- < keys >
-	/** url key */
-	private String urlKey = "url";
-
-	/**
-	 * {@inheritDoc}
-	 */
-	public boolean execute(Context ctx) throws Exception {
-		String url = (String) ctx.get(this.urlKey);
-		if (log.isDebugEnabled()) {
-			log.debug("connecting to jndi server at " + url);
-		}
-		InitialContext iCtx = new InitialContext();
-		ClientAdapterFactory adapter = new ClientAdapterFactory();
-		RemoteRepository remote = (RemoteRepository) iCtx.lookup(url);
-		Repository repo = adapter.getRepository(remote);
-		CommandHelper.setRepository(ctx, repo, "jndi " + url);
-		return false;
-	}
-
-	/**
-	 * @return the url key
-	 */
-	public String getUrlKey() {
-		return urlKey;
-	}
-
-	/**
-	 * @param urlKey
-	 *            the url key to set
-	 */
-	public void setUrlKey(String urlKey) {
-		this.urlKey = urlKey;
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.standalone.cli.ext;
+
+import javax.jcr.Repository;
+import javax.naming.InitialContext;
+
+import org.apache.commons.chain.Command;
+import org.apache.commons.chain.Context;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.rmi.client.ClientAdapterFactory;
+import org.apache.jackrabbit.rmi.remote.RemoteRepository;
+import org.apache.jackrabbit.standalone.cli.CommandHelper;
+
+/**
+ * Connect to a JCR-RMI server
+ */
+public class ConnectToJNDIServer implements Command {
+	/** logger */
+	private static Log log = LogFactory.getLog(ConnectToJNDIServer.class);
+
+	// ---------------------------- < keys >
+	/** url key */
+	private String urlKey = "url";
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean execute(Context ctx) throws Exception {
+		String url = (String) ctx.get(this.urlKey);
+		if (log.isDebugEnabled()) {
+			log.debug("connecting to jndi server at " + url);
+		}
+		InitialContext iCtx = new InitialContext();
+		ClientAdapterFactory adapter = new ClientAdapterFactory();
+		RemoteRepository remote = (RemoteRepository) iCtx.lookup(url);
+		Repository repo = adapter.getRepository(remote);
+		CommandHelper.setRepository(ctx, repo, "jndi " + url);
+		return false;
+	}
+
+	/**
+	 * @return the url key
+	 */
+	public String getUrlKey() {
+		return urlKey;
+	}
+
+	/**
+	 * @param urlKey
+	 *            the url key to set
+	 */
+	public void setUrlKey(String urlKey) {
+		this.urlKey = urlKey;
+	}
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/ext/ConnectToJNDIServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/fs/FileToInputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/namespace/SetNamespacePrefix.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/BootstrapConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/JcrApiNotFoundException.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/JcrApiNotFoundException.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/JcrApiNotFoundException.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/JcrApiNotFoundException.java Wed Oct 31 14:06:06 2012
@@ -1,38 +1,38 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.j2ee;
-
-/**
- * Exception for signaling that the JCR API is not available.
- */
-public class JcrApiNotFoundException extends ServletExceptionWithCause {
-
-    /**
-     * Serial version UID
-     */
-    private static final long serialVersionUID = -6439777923943394980L;
-
-    /**
-     * Creates an exception to signal that the JCR API is not available.
-     *
-     * @param e the specific exception that indicates the lack of the JCR API
-     */
-    public JcrApiNotFoundException(ClassNotFoundException e) {
-        super("JCR API (jcr-1.0.jar) not available in the classpath", e);
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.j2ee;
+
+/**
+ * Exception for signaling that the JCR API is not available.
+ */
+public class JcrApiNotFoundException extends ServletExceptionWithCause {
+
+    /**
+     * Serial version UID
+     */
+    private static final long serialVersionUID = -6439777923943394980L;
+
+    /**
+     * Creates an exception to signal that the JCR API is not available.
+     *
+     * @param e the specific exception that indicates the lack of the JCR API
+     */
+    public JcrApiNotFoundException(ClassNotFoundException e) {
+        super("JCR API (jcr-1.0.jar) not available in the classpath", e);
+    }
+
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/JcrApiNotFoundException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/bind/BindServletRequest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/bind/BindServletRequest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/bind/BindServletRequest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/bind/BindServletRequest.java Wed Oct 31 14:06:06 2012
@@ -1,65 +1,65 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.webdav.bind;
-
-import org.apache.jackrabbit.webdav.DavException;
-import org.apache.jackrabbit.webdav.DavResourceLocator;
-
-/**
- * <code>BindServletRequest</code> provides extension useful for functionality
- * related to BIND specification.
- */
-public interface BindServletRequest {
-
-    /**
-     * Returns the {@link RebindInfo} present with the request
-     *
-     * @return {@link RebindInfo} object
-     * @throws org.apache.jackrabbit.webdav.DavException in case of an invalid or missing request body
-     */
-    public RebindInfo getRebindInfo() throws DavException;
-
-    /**
-     * Returns the {@link UnbindInfo} present with the request
-     *
-     * @return {@link UnbindInfo} object
-     * @throws org.apache.jackrabbit.webdav.DavException in case of an invalid or missing request body
-     */
-    public UnbindInfo getUnbindInfo() throws DavException;
-
-    /**
-     * Returns the {@link BindInfo} present with the request
-     *
-     * @return {@link BindInfo} object
-     * @throws org.apache.jackrabbit.webdav.DavException in case of an invalid or missing request body
-     */
-    public BindInfo getBindInfo() throws DavException;
-
-    /**
-     * Parses a href and returns the path of the resource.
-     *
-     * @return path of the resource identified by the href.
-     */
-    public DavResourceLocator getHrefLocator(String href) throws DavException;
-
-    /**
-     * Returns the path of the member resource of the request resource which is identified by the segment parameter.
-     *
-     * @return path of internal member resource.
-     */
-    public DavResourceLocator getMemberLocator(String segment);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.webdav.bind;
+
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.DavResourceLocator;
+
+/**
+ * <code>BindServletRequest</code> provides extension useful for functionality
+ * related to BIND specification.
+ */
+public interface BindServletRequest {
+
+    /**
+     * Returns the {@link RebindInfo} present with the request
+     *
+     * @return {@link RebindInfo} object
+     * @throws org.apache.jackrabbit.webdav.DavException in case of an invalid or missing request body
+     */
+    public RebindInfo getRebindInfo() throws DavException;
+
+    /**
+     * Returns the {@link UnbindInfo} present with the request
+     *
+     * @return {@link UnbindInfo} object
+     * @throws org.apache.jackrabbit.webdav.DavException in case of an invalid or missing request body
+     */
+    public UnbindInfo getUnbindInfo() throws DavException;
+
+    /**
+     * Returns the {@link BindInfo} present with the request
+     *
+     * @return {@link BindInfo} object
+     * @throws org.apache.jackrabbit.webdav.DavException in case of an invalid or missing request body
+     */
+    public BindInfo getBindInfo() throws DavException;
+
+    /**
+     * Parses a href and returns the path of the resource.
+     *
+     * @return path of the resource identified by the href.
+     */
+    public DavResourceLocator getHrefLocator(String href) throws DavException;
+
+    /**
+     * Returns the path of the member resource of the request resource which is identified by the segment parameter.
+     *
+     * @return path of internal member resource.
+     */
+    public DavResourceLocator getMemberLocator(String segment);
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/bind/BindServletRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/RebindMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/RebindMethod.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/RebindMethod.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/RebindMethod.java Wed Oct 31 14:06:06 2012
@@ -1,54 +1,54 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.webdav.client.methods;
-
-import org.apache.jackrabbit.webdav.bind.RebindInfo;
-import org.apache.jackrabbit.webdav.DavServletResponse;
-
-import java.io.IOException;
-
-/**
- * <code>RebindMethod</code> replaces a binding to a resource (atomic version of move).
- */
-public class RebindMethod extends DavMethodBase {
-
-    public RebindMethod(String uri, RebindInfo info) throws IOException {
-        super(uri);
-        setRequestBody(info);
-    }
-
-    //---------------------------------------------------------< HttpMethod >---
-    /**
-     * @see org.apache.commons.httpclient.HttpMethod#getName()
-     */
-    @Override
-    public String getName() {
-        return "REBIND";
-    }
-
-    //------------------------------------------------------< DavMethodBase >---
-    /**
-     * @param statusCode
-     * @return true if status code is 200 (existing binding was overwritten) or
-     * 201 (new binding created).
-     */
-    @Override
-    protected boolean isSuccess(int statusCode) {
-        return statusCode == DavServletResponse.SC_CREATED || statusCode == DavServletResponse.SC_OK;
-    }
-}
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.webdav.client.methods;
+
+import org.apache.jackrabbit.webdav.bind.RebindInfo;
+import org.apache.jackrabbit.webdav.DavServletResponse;
+
+import java.io.IOException;
+
+/**
+ * <code>RebindMethod</code> replaces a binding to a resource (atomic version of move).
+ */
+public class RebindMethod extends DavMethodBase {
+
+    public RebindMethod(String uri, RebindInfo info) throws IOException {
+        super(uri);
+        setRequestBody(info);
+    }
+
+    //---------------------------------------------------------< HttpMethod >---
+    /**
+     * @see org.apache.commons.httpclient.HttpMethod#getName()
+     */
+    @Override
+    public String getName() {
+        return "REBIND";
+    }
+
+    //------------------------------------------------------< DavMethodBase >---
+    /**
+     * @param statusCode
+     * @return true if status code is 200 (existing binding was overwritten) or
+     * 201 (new binding created).
+     */
+    @Override
+    protected boolean isSuccess(int statusCode) {
+        return statusCode == DavServletResponse.SC_CREATED || statusCode == DavServletResponse.SC_OK;
+    }
+}
+

Propchange: jackrabbit/branches/2.2/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods/RebindMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java Wed Oct 31 14:06:06 2012
@@ -1,120 +1,120 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.webdav.server;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.methods.HeadMethod;
-import org.apache.commons.httpclient.methods.PutMethod;
-import org.apache.jackrabbit.webdav.DavException;
-import org.apache.jackrabbit.webdav.client.methods.DeleteMethod;
-import org.apache.jackrabbit.webdav.client.methods.MoveMethod;
-
-/**
- * Test cases for RFC 4918 Destination header functionality
- * (see <a href="http://www.webdav.org/specs/rfc4918.html#rfc.section.10.3">RFC 4918, Section 10.3</a>
- * <p>
- * Required system properties:
- * <ul>
- *   <li>webdav.test.url</li>
- *   <li>webdav.test.username</li>
- *   <li>webdav.test.password</li>
- * </ul>
- */
-
-public class RFC4918DestinationHeaderTest extends TestCase {
-
-    private String root;
-    private URI uri;
-    private String username, password;
-    private HttpClient client;
-    
-    @Override
-    protected void setUp() throws Exception {
-        this.uri = URI.create(System.getProperty("webdav.test.url"));
-        this.root = this.uri.toASCIIString();
-        if (!this.root.endsWith("/")) {
-            this.root += "/";
-        }
-        this.username = System.getProperty(("webdav.test.username"), "");
-        this.password = System.getProperty(("webdav.test.password"), "");
-        this.client = new HttpClient();
-        this.client.getState().setCredentials(
-                new AuthScope(this.uri.getHost(), this.uri.getPort()),
-                new UsernamePasswordCredentials(this.username, this.password));
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-    
-    public void testMove() throws HttpException, IOException, DavException, URISyntaxException {
-
-        String testuri = this.root + "movetest";
-        String destinationuri = testuri + "2";
-        String destinationpath = new URI(destinationuri).getRawPath();
-        // make sure the scheme is removed
-        assertFalse(destinationpath.contains(":"));
-        
-        int status;
-        try {
-            PutMethod put = new PutMethod(testuri);
-            status = this.client.executeMethod(put);
-            assertTrue("status: " + status, status == 200 || status == 201 || status == 204);
-
-            // try to move outside the servlet's name space
-            MoveMethod move = new MoveMethod(testuri, "/foobar", true);
-            status = this.client.executeMethod(move);
-            assertTrue("status: " + status, status == 403);
-
-            // try a relative path
-            move = new MoveMethod(testuri, "foobar", true);
-            status = this.client.executeMethod(move);
-            assertTrue("status: " + status, status == 400);
-
-            move = new MoveMethod(testuri, destinationpath, true);
-            status = this.client.executeMethod(move);
-            assertTrue("status: " + status, status == 200 || status == 201 || status == 204);
-            
-            HeadMethod head = new HeadMethod(destinationuri);
-            status = this.client.executeMethod(head);
-            assertTrue("status: " + status, status == 200);
-
-            head = new HeadMethod(testuri);
-            status = this.client.executeMethod(head);
-            assertTrue("status: " + status, status == 404);
-
-        } finally {
-            DeleteMethod delete = new DeleteMethod(testuri);
-            status = this.client.executeMethod(delete);
-            assertTrue("status: " + status, status == 200 || status == 204 || status == 404);
-            delete = new DeleteMethod(destinationuri);
-            status = this.client.executeMethod(delete);
-            assertTrue("status: " + status, status == 200 || status == 204 || status == 404);
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.webdav.server;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.methods.HeadMethod;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.client.methods.DeleteMethod;
+import org.apache.jackrabbit.webdav.client.methods.MoveMethod;
+
+/**
+ * Test cases for RFC 4918 Destination header functionality
+ * (see <a href="http://www.webdav.org/specs/rfc4918.html#rfc.section.10.3">RFC 4918, Section 10.3</a>
+ * <p>
+ * Required system properties:
+ * <ul>
+ *   <li>webdav.test.url</li>
+ *   <li>webdav.test.username</li>
+ *   <li>webdav.test.password</li>
+ * </ul>
+ */
+
+public class RFC4918DestinationHeaderTest extends TestCase {
+
+    private String root;
+    private URI uri;
+    private String username, password;
+    private HttpClient client;
+    
+    @Override
+    protected void setUp() throws Exception {
+        this.uri = URI.create(System.getProperty("webdav.test.url"));
+        this.root = this.uri.toASCIIString();
+        if (!this.root.endsWith("/")) {
+            this.root += "/";
+        }
+        this.username = System.getProperty(("webdav.test.username"), "");
+        this.password = System.getProperty(("webdav.test.password"), "");
+        this.client = new HttpClient();
+        this.client.getState().setCredentials(
+                new AuthScope(this.uri.getHost(), this.uri.getPort()),
+                new UsernamePasswordCredentials(this.username, this.password));
+        super.setUp();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+    public void testMove() throws HttpException, IOException, DavException, URISyntaxException {
+
+        String testuri = this.root + "movetest";
+        String destinationuri = testuri + "2";
+        String destinationpath = new URI(destinationuri).getRawPath();
+        // make sure the scheme is removed
+        assertFalse(destinationpath.contains(":"));
+        
+        int status;
+        try {
+            PutMethod put = new PutMethod(testuri);
+            status = this.client.executeMethod(put);
+            assertTrue("status: " + status, status == 200 || status == 201 || status == 204);
+
+            // try to move outside the servlet's name space
+            MoveMethod move = new MoveMethod(testuri, "/foobar", true);
+            status = this.client.executeMethod(move);
+            assertTrue("status: " + status, status == 403);
+
+            // try a relative path
+            move = new MoveMethod(testuri, "foobar", true);
+            status = this.client.executeMethod(move);
+            assertTrue("status: " + status, status == 400);
+
+            move = new MoveMethod(testuri, destinationpath, true);
+            status = this.client.executeMethod(move);
+            assertTrue("status: " + status, status == 200 || status == 201 || status == 204);
+            
+            HeadMethod head = new HeadMethod(destinationuri);
+            status = this.client.executeMethod(head);
+            assertTrue("status: " + status, status == 200);
+
+            head = new HeadMethod(testuri);
+            status = this.client.executeMethod(head);
+            assertTrue("status: " + status, status == 404);
+
+        } finally {
+            DeleteMethod delete = new DeleteMethod(testuri);
+            status = this.client.executeMethod(delete);
+            assertTrue("status: " + status, status == 200 || status == 204 || status == 404);
+            delete = new DeleteMethod(destinationuri);
+            status = this.client.executeMethod(delete);
+            assertTrue("status: " + status, status == 200 || status == 204 || status == 404);
+        }
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native