jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1182309 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
Date Wed, 12 Oct 2011 11:17:39 GMT
Author: angela
Date: Wed Oct 12 11:17:39 2011
New Revision: 1182309

URL: http://svn.apache.org/viewvc?rev=1182309&view=rev
Log:
minor improvement

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java?rev=1182309&r1=1182308&r2=1182309&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
Wed Oct 12 11:17:39 2011
@@ -333,24 +333,24 @@ public abstract class JcrRemotingServlet
                 webdavResponse.setStatus(DavServletResponse.SC_OK);
                 JsonWriter writer = new JsonWriter(webdavResponse.getWriter());
 
-                String[] includes =
-                        webdavRequest.getParameterValues(PARAM_INCLUDE);
+                String[] includes = webdavRequest.getParameterValues(PARAM_INCLUDE);
                 if (includes == null || !JCR_3005) {
                     writer.write(node, depth);
                 } else {
                     Collection<Node> nodes = new ArrayList<Node>();
                     Set<String> alreadyAdded = new HashSet<String>();
-                    for (int i = 0; i < includes.length; i++) {
+                    for (String include : includes) {
                         try {
                             Node n;
-                            if (includes[i].startsWith("/")) {
-                                n = session.getNode(includes[i]);
+                            if (include.startsWith("/")) {
+                                n = session.getNode(include);
                             } else {
-                                n = node.getNode(includes[i]);
+                                n = node.getNode(include);
                             }
-                            if (!alreadyAdded.contains(n.getPath())) {
+                            String np = n.getPath();
+                            if (!alreadyAdded.contains(np)) {
                                 nodes.add(n);
-                                alreadyAdded.add(n.getPath());
+                                alreadyAdded.add(np);
                             }
                         } catch (PathNotFoundException e) {
                             // skip missing node



Mime
View raw message