summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-indexer
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-10-07 10:39:59 +0000
committerOlivier Lamy <olamy@apache.org>2011-10-07 10:39:59 +0000
commitc98687154cd8fd6e255bd818cfb6c658ef0ce43e (patch)
tree9f714bdad45392b1298f7f51058a37093846b815 /archiva-modules/archiva-base/archiva-indexer
parent403c5e5535b65bb7559e880485e272353aebb304 (diff)
downloadarchiva-c98687154cd8fd6e255bd818cfb6c658ef0ce43e.tar.gz
archiva-c98687154cd8fd6e255bd818cfb6c658ef0ce43e.zip
fix NPE in ArtifactLocator during scanning
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1179990 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-indexer')
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
index 09efd05d9..965aa49f4 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java
@@ -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();