mirror of
https://github.com/apache/archiva.git
synced 2025-02-07 10:39:02 +00:00
small optim as no need to continue querying here
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8565793eed
commit
6f73874474
@ -1847,9 +1847,6 @@ public void removeArtifact( final String repositoryId, final String namespace, f
|
||||
new ArtifactMetadataModel.KeyBuilder().withRepositoryId( repositoryId ).withNamespace( namespace ).withId(
|
||||
id ).withProjectVersion( version ).withProject( project ).build();
|
||||
|
||||
|
||||
Keyspace keyspace = cassandraArchivaManager.getKeyspace();
|
||||
|
||||
this.artifactMetadataTemplate.deleteRow( key );
|
||||
|
||||
key =
|
||||
@ -1858,6 +1855,7 @@ public void removeArtifact( final String repositoryId, final String namespace, f
|
||||
|
||||
this.projectVersionMetadataModelTemplate.deleteRow( key );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2019,9 +2017,14 @@ public Collection<ArtifactMetadata> getArtifacts( final String repoId, final Str
|
||||
.addEqualsExpression( "projectVersion", projectVersion ) //
|
||||
.execute();
|
||||
|
||||
if (result.get() == null || result.get().getCount() < 1)
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
List<ArtifactMetadata> artifactMetadatas = new ArrayList<ArtifactMetadata>( result.get().getCount() );
|
||||
|
||||
LongSerializer ls = LongSerializer.get();
|
||||
|
||||
|
||||
for ( Row<String, String, String> row : result.get() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user