From 1e0f4369eb73c914736dcd71f3204cf9d84f7d0f Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 27 Sep 2012 09:11:37 +0000 Subject: [PATCH] if no artifacts found try next repository git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1390906 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/rest/services/DefaultBrowseService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java index 5522d37bf..891c250e2 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java @@ -61,7 +61,6 @@ import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.inject.Named; -import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; import java.io.File; import java.io.IOException; @@ -685,9 +684,10 @@ public class DefaultBrowseService List artifacts = new ArrayList( metadataResolver.resolveArtifacts( session, repoId, groupId, artifactId, version ) ); Collections.sort( artifacts, ArtifactMetadataVersionComparator.INSTANCE ); - - return buildArtifacts( artifacts, repoId ); - + if ( artifacts != null && !artifacts.isEmpty() ) + { + return buildArtifacts( artifacts, repoId ); + } } } catch ( MetadataResolutionException e )