diff options
author | Sumapriya Sarvepalli <ss00493505@techmahindra.com> | 2018-08-29 18:01:56 +0530 |
---|---|---|
committer | Sumapriya Sarvepalli <ss00493505@techmahindra.com> | 2018-08-29 18:01:56 +0530 |
commit | 3e093cf65a30e3d4bacc959af52df5c9d16a5932 (patch) | |
tree | da686150cb81a03e9216117356cdf82daf3847b7 | |
parent | 442e4e209be9f2bfc737d77bd019d17774193413 (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=AV4-Vab632hFUzlqc5oV&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/dmf/mr/backends/memory/MemoryQueue.java
Line No:L46 L105 L172
Change-Id: Ifce2d0206e1a0898aa238a86259de7b41b2c8a23
Issue-ID: DMAAP-672
Signed-off-by: Sumapriya Sarvepalli <ss00493505@techmahindra.com>
-rw-r--r-- | src/main/java/com/att/dmf/mr/backends/memory/MemoryQueue.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/att/dmf/mr/backends/memory/MemoryQueue.java b/src/main/java/com/att/dmf/mr/backends/memory/MemoryQueue.java index 0629972..8ab4619 100644 --- a/src/main/java/com/att/dmf/mr/backends/memory/MemoryQueue.java +++ b/src/main/java/com/att/dmf/mr/backends/memory/MemoryQueue.java @@ -43,7 +43,7 @@ public class MemoryQueue { * constructor storing hashMap objects in Queue and Offsets object */ public MemoryQueue() { - fQueue = new HashMap<String, LogBuffer>(); + fQueue = new HashMap<>(); fOffsets = new HashMap<String, HashMap<String, Integer>>(); } @@ -102,7 +102,7 @@ public class MemoryQueue { HashMap<String, Integer> offsetMap = fOffsets.get(consumerName); if (offsetMap == null) { - offsetMap = new HashMap<String, Integer>(); + offsetMap = new HashMap<>(); fOffsets.put(consumerName, offsetMap); } Integer offset = offsetMap.get(topic); @@ -169,7 +169,7 @@ public class MemoryQueue { public LogBuffer(int maxSize) { fBaseOffset = 0; fMaxSize = maxSize; - fList = new ArrayList<String>(); + fList = new ArrayList<>(); } /** |