You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2005/09/20 14:33:31 UTC
svn commit: r290433 -
/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItem.java
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;
}
}