aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-04-24 11:52:05 +1000
committerOlivier Lamy <olamy@apache.org>2014-04-24 11:52:24 +1000
commit30d380e6b03aa1016c4ec0ba2df79336cc5e7c81 (patch)
tree8f7b6c2ffe4f812728331c0901ed9027f26c3933 /archiva-modules
parent641e04909f6921be57c0650131f471a8b3e277d3 (diff)
downloadarchiva-30d380e6b03aa1016c4ec0ba2df79336cc5e7c81.tar.gz
archiva-30d380e6b03aa1016c4ec0ba2df79336cc5e7c81.zip
make no limit working back
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java3
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java
index c126fd740..2a41526e2 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java
@@ -274,7 +274,8 @@ public class MavenRepositorySearch
request.setContexts( getIndexingContexts( indexingContextIds ) );
if ( limits != null )
{
- if ( limits.getSelectedPage() < 1 )
+ // we apply limits only when first page asked
+ if ( limits.getSelectedPage() == 0 )
{
request.setCount( limits.getPageSize() * ( Math.max( 1, limits.getSelectedPage() ) ) );
}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java
index c3c8bfa0c..4b0d993ef 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java
@@ -879,7 +879,7 @@ public class MavenRepositorySearchTest
repo.toURI().toURL().toExternalForm(),
indexDirectory.toURI().toURL().toString(), search.getAllIndexCreators() );
- SearchResultLimits limits = new SearchResultLimits( 0 );
+ SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
limits.setPageSize( 300 );
EasyMock.expect( archivaConfig.getConfiguration() ).andReturn( config ).times( 1, 5 );