Sonar major issues
[dmaap/messagerouter/dmaapclient.git] / src / main / java / com / att / nsa / mr / client / impl / MRSimplerBatchPublisher.java
index 87910cb..ef0d13a 100644 (file)
@@ -177,7 +177,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
        public void close() {
                try {
                        final List<message> remains = close(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
-                       if (remains.size() > 0) {
+                       if (remains.isEmpty()) {
                                getLog().warn("Closing publisher with " + remains.size() + " messages unsent. "
                                                + "Consider using MRBatchingPublisher.close( long timeout, TimeUnit timeoutUnits ) to recapture unsent messages on close.");
                        }
@@ -235,7 +235,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
 
        private synchronized boolean shouldSendNow() {
                boolean shouldSend = false;
-               if (fPending.size() > 0) {
+               if (fPending.isEmpty()) {
                        final long nowMs = Clock.now();
 
                        shouldSend = (fPending.size() >= fMaxBatchSize);
@@ -730,10 +730,6 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
        private void DME2Configue() throws Exception {
                try {
 
-                       /*
-                        * FileReader reader = new FileReader(new File (producerFilePath));
-                        * Properties props = new Properties(); props.load(reader);
-                        */
                        latitude = props.getProperty("Latitude");
                        longitude = props.getProperty("Longitude");
                        version = props.getProperty("Version");
@@ -742,12 +738,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
                        partner = props.getProperty("Partner");
                        routeOffer = props.getProperty("routeOffer");
                        subContextPath = props.getProperty("SubContextPath") + fTopic;
-                       /*
-                        * if(props.getProperty("partition")!=null &&
-                        * !props.getProperty("partition").equalsIgnoreCase("")){
-                        * subContextPath=subContextPath+"?partitionKey="+props.getProperty(
-                        * "partition"); }
-                        */
+                       
                        protocol = props.getProperty("Protocol");
                        methodType = props.getProperty("MethodType");
                        dmeuser = props.getProperty("username");