]> source.dussan.org Git - archiva.git/commitdiff
fix NPE in ArtifactLocator during scanning
authorOlivier Lamy <olamy@apache.org>
Fri, 7 Oct 2011 10:39:59 +0000 (10:39 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 7 Oct 2011 10:39:59 +0000 (10:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1179990 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java

index 09efd05d9b85468425b1e6d3b30e6d4e99bb7f83..965aa49f48879d38925236f5df9b5b56ac989e07 100644 (file)
@@ -34,6 +34,9 @@ import org.apache.lucene.search.BooleanQuery;
 import org.apache.maven.index.ArtifactInfo;
 import org.apache.maven.index.FlatSearchRequest;
 import org.apache.maven.index.FlatSearchResponse;
+import org.apache.maven.index.GroupedSearchRequest;
+import org.apache.maven.index.Grouping;
+import org.apache.maven.index.IteratorSearchRequest;
 import org.apache.maven.index.MAVEN;
 import org.apache.maven.index.NexusIndexer;
 import org.apache.maven.index.OSGI;
@@ -235,8 +238,10 @@ public class NexusRepositorySearch
         {
             FlatSearchRequest request = new FlatSearchRequest( q );
             request.setContexts( getIndexingContexts( indexingContextIds ) );
+
             FlatSearchResponse response = indexer.searchFlat( request );
 
+
             if ( response == null || response.getTotalHits() == 0 )
             {
                 SearchResults results = new SearchResults();
@@ -590,7 +595,7 @@ public class NexusRepositorySearch
         return true;
     }
 
-    private SearchResults paginate( SearchResults results )
+    protected SearchResults paginate( SearchResults results )
     {
         SearchResultLimits limits = results.getLimits();
         SearchResults paginated = new SearchResults();