jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r783332 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
Date Wed, 10 Jun 2009 12:48:12 GMT
Author: angela
Date: Wed Jun 10 12:48:12 2009
New Revision: 783332

URL: http://svn.apache.org/viewvc?rev=783332&view=rev
Log:
JCR-1104: JSR 283 support

- remove redundant casts now that 283 api is present

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java?rev=783332&r1=783331&r2=783332&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/TraversingNodeResolver.java
Wed Jun 10 12:48:12 2009
@@ -19,7 +19,6 @@
 
 import org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter;
 import org.apache.jackrabbit.core.NodeImpl;
-import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.slf4j.Logger;
@@ -64,11 +63,9 @@
      */
     public Node findNode(Name nodeName, Name ntName) throws RepositoryException {
         String sr = getSearchRoot(ntName);
-        // TODO: remove cast once 283 is released
-        SessionImpl sImpl = (SessionImpl) getSession();
-        if (sImpl.nodeExists(sr)) {
+        if (getSession().nodeExists(sr)) {
             try {
-                Node root = sImpl.getNode(sr);
+                Node root = getSession().getNode(sr);
                 return collectNode(nodeName, ntName, root.getNodes());
             } catch (PathNotFoundException e) {
                 // should not get here
@@ -83,11 +80,9 @@
      */
     public Node findNode(Name propertyName, String value, Name ntName) throws RepositoryException
{
         String sr = getSearchRoot(ntName);
-        // TODO: remove cast once 283 is released
-        SessionImpl sImpl = (SessionImpl) getSession();
-        if (sImpl.nodeExists(sr)) {
+        if (getSession().nodeExists(sr)) {
             try {
-                Node root = sImpl.getNode(sr);
+                Node root = getSession().getNode(sr);
                 NodeIterator nodes = collectNodes(value,
                         Collections.singleton(propertyName), ntName,
                         root.getNodes(), true, 1);
@@ -108,11 +103,9 @@
     public NodeIterator findNodes(Set propertyNames, String value, Name ntName,
                                   boolean exact, long maxSize) throws RepositoryException
{
         String sr = getSearchRoot(ntName);
-        // TODO: remove cast once 283 is released
-        SessionImpl sImpl = (SessionImpl) getSession();
-        if (sImpl.nodeExists(sr)) {
+        if (getSession().nodeExists(sr)) {
             try {
-                Node root = sImpl.getNode(sr);
+                Node root = getSession().getNode(sr);
                 return collectNodes(value, propertyNames, ntName, root.getNodes(), exact,
maxSize);
             } catch (PathNotFoundException e) {
                 // should not get here



Mime
View raw message