Sonar majior issues 85/77485/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Tue, 29 Jan 2019 06:07:24 +0000 (11:37 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Tue, 29 Jan 2019 06:07:24 +0000 (11:37 +0530)
 Replace the type specification in this constructor call with the diamond operator
Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.dmaapclient%3AdmaapClient&open=AV4-MbPM32hFUzlqc5Wq&resolved=false&rules=squid%3AS2293&severities=MAJOR
Location:
src/main/java/org/onap/dmaap/mr/client/MRClientFactory.java
Line No-351

Change-Id: I729b24bff9c8652d368410e8126bfd8c48711b69
Issue-ID: DMAAP-1011
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/org/onap/dmaap/mr/client/MRClientFactory.java

index dc9d555..5c06383 100644 (file)
@@ -348,7 +348,7 @@ public class MRClientFactory {
      */
     public static MRBatchingPublisher createBatchingPublisher(String[] hostSet, String topic, int maxBatchSize,
             long maxAgeMs, boolean compress) {
-        final TreeSet<String> hosts = new TreeSet<String>();
+        final TreeSet<String> hosts = new TreeSet<>();
         for (String hp : hostSet) {
             hosts.add(hp);
         }