jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r508435 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Date Fri, 16 Feb 2007 14:59:17 GMT
Author: angela
Date: Fri Feb 16 06:59:17 2007
New Revision: 508435

URL: http://svn.apache.org/viewvc?view=rev&rev=508435
Log:
#0000 - minor improvement

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?view=diff&rev=508435&r1=508434&r2=508435
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Fri Feb 16 06:59:17 2007
@@ -474,9 +474,9 @@
         try {
             return (Property) itemMgr.getItem(entry);
         } catch (AccessDeniedException e) {
-            throw new PathNotFoundException(relPath.toString());
+            throw new PathNotFoundException(relPath);
         } catch (ItemNotFoundException e) {
-            throw new PathNotFoundException(relPath.toString());
+            throw new PathNotFoundException(relPath);
         }
     }
 
@@ -564,22 +564,6 @@
         } else {
             return new LazyItemIterator(itemMgr, session.getHierarchyManager(), refs.iterator());
         }
-        /*
-        try {
-            ItemStateManager itemStateMgr = session.getItemStateManager();
-            Collection refStates = itemStateMgr.getReferingStates(getNodeState());
-            if (refStates.isEmpty()) {
-                // there are no references, return empty iterator
-                return IteratorHelper.EMPTY;
-            } else {
-                return new LazyItemIterator(itemMgr, refStates);
-            }
-        } catch (ItemStateException e) {
-            String msg = "Unable to retrieve REFERENCE properties that refer to " + safeGetJCRPath();
-            log.debug(msg);
-            throw new RepositoryException(msg, e);
-        }
-        */
     }
 
     /**
@@ -588,7 +572,7 @@
     public boolean hasNode(String relPath) throws RepositoryException {
         checkStatus();
         NodeEntry nodeEntry = resolveRelativeNodePath(relPath);
-        return (nodeEntry != null) ? itemMgr.itemExists(nodeEntry) : false;
+        return (nodeEntry != null) && itemMgr.itemExists(nodeEntry);
     }
 
     /**
@@ -597,7 +581,7 @@
     public boolean hasProperty(String relPath) throws RepositoryException {
         checkStatus();
         PropertyEntry childEntry = resolveRelativePropertyPath(relPath);
-        return (childEntry != null) ? itemMgr.itemExists(childEntry) : false;
+        return (childEntry != null) && itemMgr.itemExists(childEntry);
     }
 
     /**
@@ -685,7 +669,6 @@
         List mixinValue = getMixinTypes();
         if (mixinValue.contains(mixinQName)) {
             log.warn("Mixin " + mixinName + " has already been transiently added -> Ignored.");
-            return;
         } else {
             mixinValue.add(mixinQName);
             // perform the operation



Mime
View raw message