Fix up some checkstyle/PMD complaints in Metrics code
Change-Id: Ie62062fad71225d85f3d70142d3a72cbc3003b47
diff --git a/src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java b/src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java
index 64db953..bf4e4c2 100644
--- a/src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/MetricsObjectResource.java
@@ -19,6 +19,12 @@
@SuppressWarnings("rawtypes")
public class MetricsObjectResource {
+ private List<TimerObjectResource> timers;
+ private List<GaugeObjectResource> gauges;
+ private List<CounterObjectResource> counters;
+ private List<MeterObjectResource> meters;
+ private List<HistogramObjectResource> histograms;
+
/**
* Base Metric object that all metrics inherit from. Defines common
* attributes.
@@ -185,13 +191,6 @@
}
}
-
- private List<TimerObjectResource> timers;
- private List<GaugeObjectResource> gauges;
- private List<CounterObjectResource> counters;
- private List<MeterObjectResource> meters;
- private List<HistogramObjectResource> histograms;
-
/**
* Gets the list of Gauge objects.
*
diff --git a/src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java b/src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java
index 89746e3..59c450c 100644
--- a/src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/MetricsResource.java
@@ -17,6 +17,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* REST APIs for Metrics objects.
@@ -27,7 +28,7 @@
* Metric filter to allow selecting metrics by name.
*/
private static class MetricNameFilter implements MetricFilter {
- final HashSet<String> names;
+ private final Set<String> names;
/**
* Hide default constructor.
diff --git a/src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java b/src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java
index d79e659..3a3f493 100644
--- a/src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java
+++ b/src/main/java/net/onrc/onos/core/metrics/web/MetricsWebRoutable.java
@@ -11,6 +11,9 @@
public class MetricsWebRoutable implements RestletRoutable {
/**
* Creates the Restlet router and binds to the proper resources.
+ *
+ * @param context Context to use for the restlet
+ * @return the router for Metrics REST calls
*/
@Override
public Restlet getRestlet(Context context) {
@@ -22,7 +25,9 @@
/**
- * Sets the base path for the Metrics.
+ * Defines the base path for the Metrics.
+ *
+ * @return base path for Metrics REST APIs
*/
@Override
public String basePath() {