jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r691305 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
Date Tue, 02 Sep 2008 16:26:32 GMT
Author: jukka
Date: Tue Sep  2 09:26:30 2008
New Revision: 691305

URL: http://svn.apache.org/viewvc?rev=691305&view=rev
Log:
JCR-1538: [patch] add toString for NodeImpl and PropertyImpl 

Include a "node" or "property" prefix in the ItemImpl.toString() output.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java?rev=691305&r1=691304&r2=691305&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
Tue Sep  2 09:26:30 2008
@@ -1322,13 +1322,17 @@
     //--------------------------------------------------------------< Object >
 
     /**
-     * Returns the ({@link #safeGetJCRPath() safe}) path of this item
-     * for use in diagnostic output.
+     * Returns a string with the type and ({@link #safeGetJCRPath() safe}) path
+     * of this item for use in diagnostic output.
      *
      * @return item path
      */
     public String toString() {
-        return safeGetJCRPath();
+        if (isNode()) {
+            return "node " + safeGetJCRPath();
+        } else {
+            return "property " + safeGetJCRPath();
+        }
     }
 
 }



Mime
View raw message