diff options
author | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2018-03-27 16:13:58 +0530 |
---|---|---|
committer | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2018-03-27 16:13:58 +0530 |
commit | 10502fb34bfe050bb8400d009bdf1cc42f4ab106 (patch) | |
tree | 005c9a9ef3dc0bda079dff7cad3fd7b5e3e0be02 /src/main/java/com/att/nsa | |
parent | f8f37f2c34b60d52d2153e5704da078c7c0aa4a2 (diff) |
Sonar major 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-MbPA32hFUzlqc5Wa&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/nsa/mr/client/MRClientBuilders.java
Line-No:365
Change-Id: I523aab6449c47a78bc647f63bf1b41dc12ccb76f
Issue-ID: DMAAP-354
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main/java/com/att/nsa')
-rw-r--r-- | src/main/java/com/att/nsa/mr/client/MRClientBuilders.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/att/nsa/mr/client/MRClientBuilders.java b/src/main/java/com/att/nsa/mr/client/MRClientBuilders.java index 00c8915..177fd30 100644 --- a/src/main/java/com/att/nsa/mr/client/MRClientBuilders.java +++ b/src/main/java/com/att/nsa/mr/client/MRClientBuilders.java @@ -362,7 +362,7 @@ public class MRClientBuilders */ public T build () { - if ( fHosts == null || fHosts.size() == 0 ) + if ( fHosts.isEmpty() ) { throw new IllegalArgumentException ( "You must provide at least one host and a topic name." ); } |