diff options
author | Olivier Lamy <olamy@apache.org> | 2015-10-07 12:08:47 +1100 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2015-10-07 12:08:47 +1100 |
commit | a39985692c55c85394deb4a075d9de2c066ff2f5 (patch) | |
tree | 2d964edc022b78ed56d44db3544a17f82b628b60 /archiva-modules/plugins | |
parent | b195fa3946c13513760d2028996e329c81a4bc87 (diff) | |
download | archiva-a39985692c55c85394deb4a075d9de2c066ff2f5.tar.gz archiva-a39985692c55c85394deb4a075d9de2c066ff2f5.zip |
ooops fix compilation
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r-- | archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java | 21 |
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, |