aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorSurendra Reddy Katam <SK00524980@techmahindra.com>2019-01-22 12:47:47 +0530
committerSurendra Reddy Katam <SK00524980@techmahindra.com>2019-01-22 12:47:47 +0530
commit10fa44b0dc843ed19fb78d393a0c373ebfd388ec (patch)
treec0e341c6cfe866fde7540d9b6a0021616d54e616 /src/main
parent895e6364dff8a1a8f469ed1ae6685a3e2bdef1b3 (diff)
Sonar majior issues
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-MbPA32hFUzlqc5WY&resolved=false&severities=MAJOR Location: src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java Line No-152 Change-Id: I8e64ecb3f88df3e042f3c3cad249bb903ee24f95 Issue-ID: DMAAP-983 Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java b/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java
index 60e0666..2c3101b 100644
--- a/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java
+++ b/src/main/java/org/onap/dmaap/mr/client/MRClientBuilders.java
@@ -149,7 +149,7 @@ public class MRClientBuilders
*/
public MRConsumer build ()
{
- if ( fHosts == null || fHosts.size() == 0 || fTopic == null )
+ if ( fHosts == null || fHosts.isEmpty() || fTopic == null )
{
throw new IllegalArgumentException ( "You must provide at least one host and a topic name." );
}