summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurya-huawei <a.u.surya@huawei.com>2017-09-21 15:55:14 +0530
committersurya-huawei <a.u.surya@huawei.com>2017-09-21 16:01:36 +0530
commitb5603e3052857610ac4ee677bbe5164af3e8d520 (patch)
tree210b92672766be97f9523e40fabc9717cce72c1e
parent0fcab42b8e88f081b66a1817c96085a46100657d (diff)
Use Integer.toString for type conversion
*Used Integer.toString instead of implicit type conversion This is done to make use of static and reduce cycles *Removed one unused import *Removed unnecessary parantheses Sometimes useless parantheses can be misleading hence removed Issue-Id: CCSDK-87 Change-Id: I23f56cb7c5a6dafa79f64d5cd8faa0994f0ff288 Signed-off-by: surya-huawei <a.u.surya@huawei.com>
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java
index e31219a2..6aaf41cd 100644
--- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java
+++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java
@@ -28,7 +28,6 @@ import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.PasswordAuthentication;
-import java.net.ProtocolException;
import java.net.URL;
import javax.net.ssl.HostnameVerifier;
@@ -88,7 +87,7 @@ public class SdncOdlConnection {
public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException
{
- return (new SdncOdlConnection(url, user, password));
+ return new SdncOdlConnection(url, user, password);
}
@@ -121,7 +120,7 @@ public class SdncOdlConnection {
}
// Write message
- httpConn.setRequestProperty("Content-Length", "" + msg.length());
+ httpConn.setRequestProperty("Content-Length", Integer.toString(msg.length()));
DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream());
outStr.write(msg.getBytes());
outStr.close();
@@ -151,7 +150,7 @@ public class SdncOdlConnection {
LOG.info("Response body :\n" + respString);
- return (respString);
+ return respString;
}