You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by GitBox <gi...@apache.org> on 2019/12/20 10:19:12 UTC

[GitHub] [sling-org-apache-sling-distribution-journal] cschneider commented on a change in pull request #18: SLING-8934 Create new metric for the number of subscribers of distrib…

cschneider commented on a change in pull request #18: SLING-8934 Create new metric for the number of subscribers of distrib…
URL: https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/18#discussion_r360309936
 
 

 ##########
 File path: src/main/java/org/apache/sling/distribution/journal/impl/publisher/DistributionPublisher.java
 ##########
 @@ -167,6 +173,13 @@ public void activate(PublisherConfiguration config, BundleContext context) {
         
         String msg = String.format("Started Publisher agent %s with packageBuilder %s, queuedTimeout %s",
                 pubAgentName, pkgType, queuedTimeout);
+        if (metricsService != null) {
 
 Review comment:
   You can not use the metricsService in the Constructor. Instead this must happen in activator. As the @Reference is mandatory you also do not need to check for null. Instead you could use requireNonNull(..) to make sure we do not forget to set it during tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services