You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:22:59 UTC
[sling-org-apache-sling-commons-metrics] 09/13: SLING-5443 - Review
the naming conventions used by JMXReporter to register the Metric MBeans
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.commons.metrics-1.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-metrics.git
commit 090aa7b09640d6ca06eb7063f4978d2ec0225b04
Author: Chetan Mehrotra <ch...@apache.org>
AuthorDate: Thu Nov 17 05:11:17 2016 +0000
SLING-5443 - Review the naming conventions used by JMXReporter to register the Metric MBeans
Remove unused instance
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/metrics@1770121 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/commons/metrics/internal/BundleMetricsMapper.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/commons/metrics/internal/BundleMetricsMapper.java b/src/main/java/org/apache/sling/commons/metrics/internal/BundleMetricsMapper.java
index 8bdbd45..a4ec010 100644
--- a/src/main/java/org/apache/sling/commons/metrics/internal/BundleMetricsMapper.java
+++ b/src/main/java/org/apache/sling/commons/metrics/internal/BundleMetricsMapper.java
@@ -27,7 +27,6 @@ import java.util.concurrent.ConcurrentMap;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import com.codahale.metrics.DefaultObjectNameFactory;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.ObjectNameFactory;
import org.osgi.framework.Bundle;
@@ -41,7 +40,6 @@ class BundleMetricsMapper implements ObjectNameFactory{
private final Logger log = LoggerFactory.getLogger(getClass());
private final ConcurrentMap<String, Bundle> metricToBundleMapping = new ConcurrentHashMap<>();
private final MetricRegistry registry;
- private final ObjectNameFactory defaultFactory = new DefaultObjectNameFactory();
BundleMetricsMapper(MetricRegistry registry) {
this.registry = registry;
@@ -66,7 +64,7 @@ class BundleMetricsMapper implements ObjectNameFactory{
mappedDomainName = domain;
}
- Hashtable<String, String> table = new Hashtable<String, String>();
+ Hashtable<String, String> table = new Hashtable<>();
table.put("type", JMX_TYPE_METRICS);
table.put("name", JmxUtil.quoteValueIfRequired(name));
try {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.