aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java6
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java4
2 files changed, 7 insertions, 3 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 93e36284d..c98b5f9d2 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
@@ -161,7 +161,7 @@ public class DefaultBrowseService
{
List<String> selectedRepos = getSelectedRepos( repositoryId );
- Set<String> projects = new LinkedHashSet<String>();
+ Set<String> projects = new LinkedHashSet<>();
RepositorySession repositorySession = repositorySessionFactory.createSession();
Set<String> namespaces;
@@ -169,7 +169,7 @@ public class DefaultBrowseService
{
MetadataResolver metadataResolver = repositorySession.getResolver();
- Set<String> namespacesToCollapse = new LinkedHashSet<String>();
+ Set<String> namespacesToCollapse = new LinkedHashSet<>();
for ( String repoId : selectedRepos )
{
namespacesToCollapse.addAll( metadataResolver.resolveNamespaces( repositorySession, repoId, groupId ) );
@@ -180,7 +180,7 @@ public class DefaultBrowseService
// TODO: this logic should be optional, particularly remembering we want to keep this code simple
// it is located here to avoid the content repository implementation needing to do too much for what
// is essentially presentation code
- namespaces = new LinkedHashSet<String>();
+ namespaces = new LinkedHashSet<>();
for ( String n : namespacesToCollapse )
{
// TODO: check performance of this
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
index 4f795ebcc..c85518a42 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
@@ -87,6 +87,7 @@ import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.IOException;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -571,6 +572,9 @@ public class Maven2RepositoryStorage
// scan all directories in the namespace, and only include those that are known to be projects
List<String> projects = new ArrayList<>();
+
+
+
File[] files = dir.listFiles( new DirectoryFilter( filter ) );
if ( files != null )
{