summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/att
diff options
context:
space:
mode:
authorSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-21 12:21:48 +0530
committerSurendra Reddy Katam <SK00524980@techmahindra.com>2018-08-21 12:21:48 +0530
commit62d53f52c5535b48bb8f253df39615b6338d822f (patch)
treee50312a98c843d9eff93cec9c17870c72efe70c0 /src/main/java/com/att
parent9a1862c3f847ca4ba21212cef9b472950e96bbc0 (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-MbT632hFUzlqc5gr&resolved=false&severities=MAJOR Location: src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java Line No- L57 L62 L71 Change-Id: I4ac3ebea88d03147a54676cd5f9c77f274dfd87a Issue-ID: DMAAP-617 Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main/java/com/att')
-rw-r--r--src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java b/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java
index 01e770e..8a6c586 100644
--- a/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java
+++ b/src/main/java/com/att/nsa/mr/test/clients/SimpleExamplePublisher.java
@@ -54,12 +54,12 @@ public class SimpleExamplePublisher
// publish some messages
final JSONObject msg1 = new JSONObject ();
msg1.put ( "Name", "Sprint" );
- //msg1.put ( "greeting", "Hello .." );
+
pub.send ( "First cambria messge" );
pub.send ( "MyPartitionKey", msg1.toString () );
final JSONObject msg2 = new JSONObject ();
- //msg2.put ( "mrclient1", System.currentTimeMillis () );
+
// ...
@@ -68,7 +68,7 @@ public class SimpleExamplePublisher
// publisher interface allows the app to get the set of unsent messages. It could
// write them to disk, for example, to try to send them later.
final List<message> stuck = pub.close ( 20, TimeUnit.SECONDS );
- if ( stuck.size () > 0 )
+ if ( stuck.isEmpty() )
{
System.err.println ( stuck.size() + " messages unsent" );
}