diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-27 09:11:37 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-27 09:11:37 +0000 |
commit | 1e0f4369eb73c914736dcd71f3204cf9d84f7d0f (patch) | |
tree | af7375be646501feaa364d92d0a2d2253ddb9fef | |
parent | fc214ca25e0d1d3416e472d157c693690e6fc40f (diff) | |
download | archiva-1e0f4369eb73c914736dcd71f3204cf9d84f7d0f.tar.gz archiva-1e0f4369eb73c914736dcd71f3204cf9d84f7d0f.zip |
if no artifacts found try next repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1390906 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java | 8 |
1 files 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<ArtifactMetadata> artifacts = new ArrayList<ArtifactMetadata>( 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 ) |