jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r918600 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java
Date Wed, 03 Mar 2010 17:49:05 GMT
Author: angela
Date: Wed Mar  3 17:49:05 2010
New Revision: 918600

URL: http://svn.apache.org/viewvc?rev=918600&view=rev
Log:
JCR-2534: jcr-server: NPE in SearchResourceImpl if PathValue path is null

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java?rev=918600&r1=918599&r2=918600&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/search/SearchResourceImpl.java
Wed Mar  3 17:49:05 2010
@@ -365,21 +365,18 @@
             } else {
                 path = row.getPath();
             }
-            return vf.createValue(path, PropertyType.PATH);
+            return (path == null) ? null : vf.createValue(path, PropertyType.PATH);
         }
     }
 
     private static void collectSelectorNames(Query query,
                                              QueryResult result,
-                                             List<String> sn) {
+                                             List<String> sn) throws RepositoryException
{
         if (query instanceof QueryObjectModel) {
             QueryObjectModel qom = (QueryObjectModel) query;
             collectSelectorNames(qom.getSource(), sn);
         } else {
-            // TODO
-            // sn.addAll(Arrays.asList(qResult.getSelectorNames()));
-            // TODO: remove once getSelectorNames() is available
-            sn.add(null); // default selector
+            sn.addAll(Arrays.asList(result.getSelectorNames()));
         }
     }
 



Mime
View raw message