diff options
author | surya-huawei <a.u.surya@huawei.com> | 2017-09-26 18:05:12 +0530 |
---|---|---|
committer | SURYA A U <a.u.surya@huawei.com> | 2017-09-27 03:11:06 +0000 |
commit | e0081f9b154b44265deb85d9d05b05f8e9719000 (patch) | |
tree | 9143a2b87eb2324895211a8fdc94bf7db05d7d95 /status-control/src/main/java | |
parent | 4ada70cf2559b8d270daebeed0f813b4387b245e (diff) |
Fix code complexity
*Use equalsIgnoreCase instead of comparing on converted cases
This is done to reduce the number of conversions
and it's more simple and it internally performs
null check as well
*Remove unused imports
This is done to increase code readability
Issue-Id: SO-118
Change-Id: Ibc78f5be645db69695c12bca1fbd0282914e90eb
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
Diffstat (limited to 'status-control/src/main/java')
-rw-r--r-- | status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java b/status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java index 99635e936d..b098a8c852 100644 --- a/status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java +++ b/status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java @@ -25,17 +25,12 @@ import org.openecomp.mso.db.catalog.CatalogDatabase; import org.openecomp.mso.logger.MessageEnum; import org.openecomp.mso.logger.MsoLogger; import org.openecomp.mso.properties.MsoJavaProperties; -import org.openecomp.mso.properties.MsoJsonProperties; import org.openecomp.mso.properties.MsoPropertiesFactory; import org.openecomp.mso.requestsdb.RequestsDatabase; -import org.openecomp.mso.utils.UUIDChecker; -import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; @@ -288,7 +283,7 @@ public class HealthCheckUtils { ip = ip.substring (0, length - 1); } return ip + url; - } else if (null != sslEnabled && "true".equals (sslEnabled.toLowerCase ())) { + } else if ("true".equalsIgnoreCase(sslEnabled)) { return "https://" + ip + ":" + port + url; } else { return "http://" + ip + ":" + port + url; |