From be20d16cfdc0525e9b5cc58a5953b78c57fc17e1 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Wed, 30 Jul 2014 18:06:15 +1000 Subject: [PATCH] more autowiring --- .../archiva/rest/services/DefaultRepositoriesService.java | 2 ++ .../archiva/metadata/repository/DefaultMetadataResolver.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java index 0aa6660c0..462af2127 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java @@ -82,6 +82,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.maven.index.context.IndexingContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.inject.Inject; @@ -144,6 +145,7 @@ public class DefaultRepositoriesService protected RepositorySessionFactory repositorySessionFactory; @Inject + @Autowired(required = false) protected List listeners = new ArrayList(); @Inject diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java index 559798a62..9570d7dbd 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java @@ -80,7 +80,7 @@ public class DefaultMetadataResolver @Inject @Autowired(required = false) - private List listeners; + private List listeners = new ArrayList<>(); /** * Cache used for namespaces -- 2.39.5