summaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/metadata-store-file
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2015-10-07 12:08:47 +1100
committerOlivier Lamy <olamy@apache.org>2015-10-07 12:08:47 +1100
commita39985692c55c85394deb4a075d9de2c066ff2f5 (patch)
tree2d964edc022b78ed56d44db3544a17f82b628b60 /archiva-modules/plugins/metadata-store-file
parentb195fa3946c13513760d2028996e329c81a4bc87 (diff)
downloadarchiva-a39985692c55c85394deb4a075d9de2c066ff2f5.tar.gz
archiva-a39985692c55c85394deb4a075d9de2c066ff2f5.zip
ooops fix compilation
Diffstat (limited to 'archiva-modules/plugins/metadata-store-file')
-rw-r--r--archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
index 2da1a5b6f..da3c44470 100644
--- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
@@ -453,16 +453,23 @@ public class FileMetadataRepository
public List<ArtifactMetadata> getArtifactsByDateRange( String repoId, Date startTime, Date endTime )
throws MetadataRepositoryException
{
- // TODO: this is quite slow - if we are to persist with this repository implementation we should build an index
- // of this information (eg. in Lucene, as before)
+ try
+ {
+ // TODO: this is quite slow - if we are to persist with this repository implementation we should build an index
+ // of this information (eg. in Lucene, as before)
- List<ArtifactMetadata> artifacts = new ArrayList<>();
- for ( String ns : getRootNamespaces( repoId ) )
+ List<ArtifactMetadata> artifacts = new ArrayList<>();
+ for ( String ns : getRootNamespaces( repoId ) )
+ {
+ getArtifactsByDateRange( artifacts, repoId, ns, startTime, endTime );
+ }
+ Collections.sort( artifacts, new ArtifactComparator() );
+ return artifacts;
+ }
+ catch ( MetadataResolutionException e )
{
- getArtifactsByDateRange( artifacts, repoId, ns, startTime, endTime );
+ throw new MetadataRepositoryException( e.getMessage(), e );
}
- Collections.sort( artifacts, new ArtifactComparator() );
- return artifacts;
}
private void getArtifactsByDateRange( List<ArtifactMetadata> artifacts, String repoId, String ns, Date startTime,