Use Integer.toString for type conversion
authorsurya-huawei <a.u.surya@huawei.com>
Thu, 21 Sep 2017 10:25:14 +0000 (15:55 +0530)
committersurya-huawei <a.u.surya@huawei.com>
Thu, 21 Sep 2017 10:31:36 +0000 (16:01 +0530)
*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>
dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java

index e31219a..6aaf41c 100644 (file)
@@ -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;
 
        }