]> source.dussan.org Git - archiva.git/commitdiff
more autowiring
authorBrett Porter <brett@apache.org>
Wed, 30 Jul 2014 08:06:15 +0000 (18:06 +1000)
committerBrett Porter <brett@apache.org>
Wed, 30 Jul 2014 08:06:15 +0000 (18:06 +1000)
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java

index 0aa6660c0417bd7508978cfd573330aedc8ac34c..462af21275e6a62d1b0c04970a566b4e4dc67ff1 100644 (file)
@@ -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<RepositoryListener> listeners = new ArrayList<RepositoryListener>();
 
     @Inject
index 559798a621e9ef26efb56863a8920f5619583296..9570d7dbd4054a2de1675f3f9fc255cbe34dbeff 100644 (file)
@@ -80,7 +80,7 @@ public class DefaultMetadataResolver
 
     @Inject
     @Autowired(required = false)
-    private List<RepositoryListener> listeners;
+    private List<RepositoryListener> listeners = new ArrayList<>();
 
     /**
      * Cache used for namespaces