jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r160858 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
Date Mon, 11 Apr 2005 11:23:53 GMT
Author: stefan
Date: Mon Apr 11 04:23:51 2005
New Revision: 160858

URL: http://svn.apache.org/viewcvs?view=rev&rev=160858
Log:
calling Node.getName() on disposed instance could throw NPE

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java?view=diff&r1=160857&r2=160858
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Mon Apr 11
04:23:51 2005
@@ -1617,12 +1617,14 @@
      * {@inheritDoc}
      */
     public String getName() throws RepositoryException {
+        // check state of this instance
+        sanityCheck();
+
         if (state.getParentUUID() == null) {
             // this is the root node
             return "";
         }
 
-        //QName name = getPrimaryPath().getNameElement().getName();
         QName name = session.getHierarchyManager().getName(id);
         try {
             return name.toJCRName(session.getNamespaceResolver());



Mime
View raw message