Fix raw use of Gauge 14/12614/3
authorRobert Varga <rovarga@cisco.com>
Fri, 7 Nov 2014 18:14:38 +0000 (19:14 +0100)
committerRobert Varga <rovarga@cisco.com>
Sat, 8 Nov 2014 20:39:48 +0000 (20:39 +0000)
It is a generic type, so add type declarations to fix warnings.

Change-Id: I228629392261c22ec6a9037795aeb5bdbccc2dfe
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/MeteredBoundedMailbox.java

index 7517efe..3afdf3e 100644 (file)
@@ -60,7 +60,7 @@ public class MeteredBoundedMailbox implements MailboxType, ProducesMessageQueue<
         if (registry.getMetrics().containsKey(metricName))
             return; //already registered
 
-        Gauge queueSize = getQueueSizeGuage(monitoredQueue);
+        Gauge<Integer> queueSize = getQueueSizeGuage(monitoredQueue);
         registerQueueSizeMetric(metricName, queueSize);
     }
 
@@ -72,7 +72,7 @@ public class MeteredBoundedMailbox implements MailboxType, ProducesMessageQueue<
         }
     }
 
-    private Gauge getQueueSizeGuage(final MeteredMessageQueue monitoredQueue ){
+    private Gauge<Integer> getQueueSizeGuage(final MeteredMessageQueue monitoredQueue ){
         return new Gauge<Integer>() {
             @Override
             public Integer getValue() {
@@ -81,7 +81,7 @@ public class MeteredBoundedMailbox implements MailboxType, ProducesMessageQueue<
         };
     }
 
-    private void registerQueueSizeMetric(String metricName, Gauge metric){
+    private void registerQueueSizeMetric(String metricName, Gauge<Integer> metric){
         try {
             registry.register(metricName,metric);
         } catch (IllegalArgumentException e) {