Sonar major issues 61/61961/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Thu, 23 Aug 2018 05:36:13 +0000 (11:06 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Thu, 23 Aug 2018 05:36:13 +0000 (11:06 +0530)
 Use isEmpty() to check whether the collection is empty or not
Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.dmaapclient%3AdmaapClient&open=AV4-MbU532hFUzlqc5hw&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/tools/MRCommandContext.java
Line No-60

Change-Id: I5b579fc3648c422762cae9852a1f65af613d4a7e
Issue-ID: DMAAP-629
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/nsa/mr/tools/MRCommandContext.java

index 3430d9c..8cc84ef 100644 (file)
@@ -57,7 +57,7 @@ public class MRCommandContext implements CommandContext
        
        public boolean checkClusterReady ()
        {
-               return ( fCluster.size () != 0 );
+               return ( fCluster.isEmpty());
        }
 
        public Collection<String> getCluster ()