From: Ram Koya Date: Mon, 13 Aug 2018 17:27:13 +0000 (+0000) Subject: Merge "Sonar major issues" X-Git-Tag: 1.1.7~17 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=f2f14cc90640a81b75f607fb09a9cfe2633abe6f;hp=-c;p=dmaap%2Fmessagerouter%2Fdmaapclient.git Merge "Sonar major issues" --- f2f14cc90640a81b75f607fb09a9cfe2633abe6f diff --combined src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java index 4400045,991c0e4..741705f --- a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java +++ b/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java @@@ -177,7 -177,7 +177,7 @@@ public class MRSimplerBatchPublisher ex public void close() { try { final List 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."); } @@@ -296,7 -296,11 +296,7 @@@ props.getProperty("partition")); try { - /* - * final String contentType = fCompress ? - * MRFormat.CAMBRIA_ZIP.toString () : MRFormat.CAMBRIA.toString () ; - */ - + final ByteArrayOutputStream baseStream = new ByteArrayOutputStream(); OutputStream os = baseStream; final String contentType = props.getProperty("contenttype"); @@@ -730,6 -734,10 +730,6 @@@ 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"); @@@ -738,7 -746,12 +738,7 @@@ 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"); @@@ -781,7 -794,7 +781,7 @@@ // SSL changes // System.setProperty("AFT_DME2_CLIENT_SSL_INCLUDE_PROTOCOLS", - // "SSLv3,TLSv1,TLSv1.1"); + System.setProperty("AFT_DME2_CLIENT_SSL_INCLUDE_PROTOCOLS", "TLSv1.1,TLSv1.2"); System.setProperty("AFT_DME2_CLIENT_IGNORE_SSL_CONFIG", "false"); System.setProperty("AFT_DME2_CLIENT_KEYSTORE_PASSWORD", "changeit");