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 )