From 78ccfccfda688df2e1987533582c193f442589cd Mon Sep 17 00:00:00 2001 From: Driptaroop Das Date: Wed, 30 Jan 2019 13:47:55 +0530 Subject: MirrorMaker.java - Multiple Sonar Fixes MirrorMaker.java - Multiple Sonar Fixes Issue-ID: DMAAP-1012 Change-Id: Ie79c79f977dc869bfcbb0d7eaf6ffe8eaa3fc7b4 Signed-off-by: Driptaroop Das --- src/main/java/org/onap/dmaap/dbcapi/model/MirrorMaker.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/main/java/org/onap') diff --git a/src/main/java/org/onap/dmaap/dbcapi/model/MirrorMaker.java b/src/main/java/org/onap/dmaap/dbcapi/model/MirrorMaker.java index e693afe..ab183d6 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/model/MirrorMaker.java +++ b/src/main/java/org/onap/dmaap/dbcapi/model/MirrorMaker.java @@ -20,14 +20,10 @@ package org.onap.dmaap.dbcapi.model; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; - -import org.apache.log4j.Logger; -import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum; import org.onap.dmaap.dbcapi.service.MirrorMakerService; +import java.util.ArrayList; + public class MirrorMaker extends DmaapObject { @@ -58,7 +54,7 @@ public class MirrorMaker extends DmaapObject { sourceCluster = source; targetCluster = target; mmName = genKey(source, target); - topics = new ArrayList(); + topics = new ArrayList<>(); } @@ -89,12 +85,10 @@ public class MirrorMaker extends DmaapObject { str.append( " \"name\": \"" + this.getMmName() + "\", \"whitelist\": \"" ); int numTargets = 0; - //for (ReplicationVector rv: vectors) { for (String rv: topics) { if ( numTargets > 0 ) { str.append( ","); } - //str.append( rv.getFqtn() ); str.append( rv ); numTargets++; } -- cgit 1.2.3-korg