jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1225176 - /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/ItemImpl.java
Date Wed, 28 Dec 2011 12:57:14 GMT
Author: mduerig
Date: Wed Dec 28 12:57:13 2011
New Revision: 1225176

URL: http://svn.apache.org/viewvc?rev=1225176&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- shortcut for same instance

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/ItemImpl.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/ItemImpl.java?rev=1225176&r1=1225175&r2=1225176&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/ItemImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/ItemImpl.java
Wed Dec 28 12:57:13 2011
@@ -108,6 +108,11 @@ abstract class ItemImpl implements Item 
 
     @Override
     public boolean isSame(Item otherItem) throws RepositoryException {
+        // Shortcut
+        if (this == otherItem) {
+            return true;
+        }
+
         // The objects are either both Node objects or both Property objects.
         if (isNode() != otherItem.isNode()) {
             return false;



Mime
View raw message