diff options
author | Sumapriya Sarvepalli <ss00493505@techmahindra.com> | 2018-08-20 16:02:59 +0530 |
---|---|---|
committer | Sumapriya Sarvepalli <ss00493505@techmahindra.com> | 2018-08-20 16:02:59 +0530 |
commit | fea469456cf7ed99248613759d83c2aeb67185fe (patch) | |
tree | 885a532f2ec29e4c93717b0682db620716daaeb7 /src/main/java | |
parent | e5f840ed7d6c284fad4834e73715058c4f98ce90 (diff) |
Sonar major issues
Replace with the diamond operator
Sonar Link:
https://sonar.onap.org/project/issues?assignees=sumapriya&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWU41WkgwGn37JfbyHyq&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/dmf/mr/backends/kafka/KafkaConsumerCache.java
Line No:L166 L395 L419 L463
Change-Id: Ie766fa53303bf45a4e028c5a557ce45f8e211f99
Issue-ID: DMAAP-616
Signed-off-by: Sumapriya Sarvepalli <ss00493505@techmahindra.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/att/dmf/mr/backends/kafka/KafkaConsumerCache.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/att/dmf/mr/backends/kafka/KafkaConsumerCache.java b/src/main/java/com/att/dmf/mr/backends/kafka/KafkaConsumerCache.java index 4340cae..126711a 100644 --- a/src/main/java/com/att/dmf/mr/backends/kafka/KafkaConsumerCache.java +++ b/src/main/java/com/att/dmf/mr/backends/kafka/KafkaConsumerCache.java @@ -163,7 +163,7 @@ public class KafkaConsumerCache { strkSetting_ZkBasePath = kDefault_ZkBasePath; fBaseZkPath = strkSetting_ZkBasePath; - fConsumers = new ConcurrentHashMap<String, Kafka011Consumer>(); + fConsumers = new ConcurrentHashMap<>(); fSweepScheduler = Executors.newScheduledThreadPool(1); curatorConsumerCache = null; @@ -392,7 +392,7 @@ public class KafkaConsumerCache { throws KafkaConsumerCacheException { if (getStatus() != KafkaConsumerCache.Status.CONNECTED) throw new KafkaConsumerCacheException("The cache service is unavailable."); - ArrayList<Kafka011Consumer> kcl = new ArrayList<Kafka011Consumer>(); + ArrayList<Kafka011Consumer> kcl = new ArrayList<>(); // final String consumerKey = makeConsumerKey(topic, consumerGroupId, // clientId); Enumeration<String> strEnum = fConsumers.keys(); @@ -416,7 +416,7 @@ public class KafkaConsumerCache { public ArrayList<Kafka011Consumer> getConsumerListForCG(String group) throws KafkaConsumerCacheException { if (getStatus() != KafkaConsumerCache.Status.CONNECTED) throw new KafkaConsumerCacheException("The cache service is unavailable."); - ArrayList<Kafka011Consumer> kcl = new ArrayList<Kafka011Consumer>(); + ArrayList<Kafka011Consumer> kcl = new ArrayList<>(); // final String consumerKey = makeConsumerKey(topic, consumerGroupId, // clientId); Enumeration<String> strEnum = fConsumers.keys(); @@ -460,7 +460,7 @@ public class KafkaConsumerCache { } public Collection<? extends Consumer> getConsumers() { - return new LinkedList<Kafka011Consumer>(fConsumers.values()); + return new LinkedList<>(fConsumers.values()); } /** |