jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r290433 - /incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java
Date Tue, 20 Sep 2005 12:33:31 GMT
Author: jukka
Date: Tue Sep 20 05:33:26 2005
New Revision: 290433

URL: http://svn.apache.org/viewcvs?rev=290433&view=rev
Log:
JCR-218: Throw RepositoryExceptions from Item.isSame. Patch contributed by Felix Meschberger.

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java?rev=290433&r1=290432&r2=290433&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java
Tue Sep 20 05:33:26 2005
@@ -158,21 +158,15 @@
      *
      * @see Item#getPath()
      */
-    public boolean isSame(Item item) {
+    public boolean isSame(Item item) throws RepositoryException {
         if (item == null) {
             return false;
         } else if (equals(item)) {
             return true;
-        } else if ((item instanceof Property) && !(this instanceof Property)) {
-            return false;
-        } else if ((item instanceof Node) && !(this instanceof Node)) {
-            return false;
+        } else if (isNode() == item.isNode()){
+            return getPath().equals(item.getPath());
         } else {
-            try {
-                return getPath().equals(item.getPath());
-            } catch (RepositoryException ex) {
-                throw new RuntimeException(ex);
-            }
+            return false;
         }
     }
 



Mime
View raw message