diff options
author | liamfallon <liam.fallon@est.tech> | 2019-07-01 09:01:19 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-07-01 09:01:19 +0000 |
commit | f08984b16abf954b7b351f21a3822e21d9d4f7c2 (patch) | |
tree | 1dc21cf3240864f37efe304a75c8055d89f48662 /examples/examples-onap-bbs/src/main/java | |
parent | c4baac8a79b0ca6340693ae47f9c424f3612e3bd (diff) |
Fix issues from Checkstyle reviews
Use lombok on fields in EnEvent.
Remove unnecessary code in BBS WebClient class
Address Sonar issue in Execurot class
Issue-ID: POLICY-1791
Change-Id: If07dc4529b121f8bfcd6ab1ae6c9def4774f9f4d
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'examples/examples-onap-bbs/src/main/java')
-rw-r--r-- | examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java b/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java index 939b104d1..e4186f131 100644 --- a/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java +++ b/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java @@ -70,11 +70,10 @@ public class WebClient { * @param username Simple Username * @param pass Simple password * @param contentType http content type - * @apram secureHttp flag indicating if HTTPS should be used * @return String response message */ public String httpRequest(String requestUrl, String requestMethod, String outputStr, String username, String pass, - String contentType, boolean secureHttp) { + String contentType) { String result = ""; StringBuilder builder = new StringBuilder(); try { @@ -82,13 +81,8 @@ public class WebClient { disableCertificateValidation(); URL url = new URL(requestUrl); - HttpURLConnection httpUrlConn = null; - if (secureHttp) { - httpUrlConn = (HttpsURLConnection) url.openConnection(); - } - else { - httpUrlConn = (HttpURLConnection) url.openConnection(); - } + HttpURLConnection httpUrlConn = (HttpURLConnection) url.openConnection(); + httpUrlConn.setDoOutput(true); httpUrlConn.setDoInput(true); httpUrlConn.setUseCaches(false); |