jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r770752 - in /jackrabbit/trunk/jackrabbit-jcr-server: pom.xml src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
Date Fri, 01 May 2009 16:54:37 GMT
Author: reschke
Date: Fri May  1 16:54:36 2009
New Revision: 770752

URL: http://svn.apache.org/viewvc?rev=770752&view=rev
Log:
JCR-1733: remove pre-JCR-2.0 workarounds

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/pom.xml
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/pom.xml?rev=770752&r1=770751&r2=770752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/pom.xml Fri May  1 16:54:36 2009
@@ -67,12 +67,6 @@
       <artifactId>jcr</artifactId>
     </dependency>
     <dependency>
-      <!-- temporarily added dependency, needed as long as JCR2 interfaces are contained
in jackrabbit-api -->
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>jackrabbit-api</artifactId>
-      <version>2.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-jcr-commons</artifactId>
       <version>2.0-SNAPSHOT</version>

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java?rev=770752&r1=770751&r2=770752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
Fri May  1 16:54:36 2009
@@ -635,10 +635,8 @@
         try {
             String itemPath = member.getLocator().getRepositoryPath();
             Item memItem = getJcrSession().getItem(itemPath);
-            //TODO once jcr2 is out: simply call removeShare()
-            if (memItem instanceof javax.jcr.Node) {
-                javax.jcr.Node n = (javax.jcr.Node) memItem;
-                n.removeShare();
+            if (memItem instanceof Node) {
+                ((Node)memItem).removeShare();
             } else {
                 memItem.remove();
             }
@@ -937,14 +935,8 @@
     public Set getParentElements() {
         try {
             if (node.getDepth() > 0) {
-                //TODO remove this check once jcr2 is out
-                if (!(node instanceof javax.jcr.Node)) {
-                    DavResourceLocator loc = locator.getFactory().createResourceLocator(
-                            locator.getPrefix(), locator.getWorkspacePath(), node.getParent().getPath(),
false);
-                    return Collections.singleton(new ParentElement(loc.getHref(true), node.getName()));
-                }
                 Set ps = new HashSet();
-                NodeIterator sharedSetIterator = ((javax.jcr.Node) node).getSharedSet();
+                NodeIterator sharedSetIterator = node.getSharedSet();
                 while (sharedSetIterator.hasNext()) {
                     Node sharednode = sharedSetIterator.nextNode();
                     DavResourceLocator loc = locator.getFactory().createResourceLocator(



Mime
View raw message