diff options
author | Denes Nemeth <denes.nemeth@nokia.com> | 2018-03-06 11:24:26 +0100 |
---|---|---|
committer | Denes Nemeth <denes.nemeth@nokia.com> | 2018-03-06 14:26:49 +0100 |
commit | 1a29d7be6656f3fac3cacd73ddd5a2e050fb04e7 (patch) | |
tree | 1cf554cec08fd43cc95f6844131a316b01245f08 /nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi | |
parent | be56383397388d35f41089723e912856c03f4673 (diff) |
Fix most sonar issues
Change-Id: I2dfae3f808aeaf94513a6e3c917eea52d6ab6322
Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com>
Issue-ID: VFC-728
Diffstat (limited to 'nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi')
3 files changed, 4 insertions, 13 deletions
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java index 4a737480..6af13c58 100644 --- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java +++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java @@ -15,11 +15,8 @@ */ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.restapi; -import org.apache.http.entity.ContentType; import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.packagetransformer.OnapVnfPackageBuilder; import org.slf4j.Logger; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -27,16 +24,13 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; - import java.io.IOException; import static org.apache.http.entity.ContentType.APPLICATION_OCTET_STREAM; import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.SystemFunctions.systemFunctions; import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.DriverProperties.BASE_URL; import static org.slf4j.LoggerFactory.getLogger; -import static org.springframework.http.HttpHeaders.CONTENT_DISPOSITION; -import static org.springframework.http.HttpHeaders.CONTENT_LENGTH; -import static org.springframework.http.HttpHeaders.CONTENT_TYPE; +import static org.springframework.http.HttpHeaders.*; import static org.springframework.http.HttpStatus.OK; import static org.springframework.http.MediaType.TEXT_HTML_VALUE; import static org.springframework.web.bind.annotation.RequestMethod.GET; diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/LcnApi.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/LcnApi.java index 883c2709..df871b09 100644 --- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/LcnApi.java +++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/LcnApi.java @@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.ResponseStatus; import javax.servlet.http.HttpServletResponse; import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.DriverProperties.BASE_URL; -import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.DriverProperties.LCN_PATH; +import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.DriverProperties.LCN_URL; import static org.slf4j.LoggerFactory.getLogger; import static org.springframework.http.HttpStatus.NO_CONTENT; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; @@ -54,7 +54,7 @@ public class LcnApi { * * @param httpResponse the HTTP response */ - @RequestMapping(value = LCN_PATH, method = GET) + @RequestMapping(value = LCN_URL, method = GET) public void testLcnConnectivity(HttpServletResponse httpResponse) { //used to test connectivity from CBAM to driver } @@ -65,7 +65,7 @@ public class LcnApi { * @param lcn the LCN notification * @param httpResponse the HTTP response */ - @RequestMapping(value = LCN_PATH, method = POST, consumes = APPLICATION_JSON_VALUE) + @RequestMapping(value = LCN_URL, method = POST, consumes = APPLICATION_JSON_VALUE) @ResponseBody @ResponseStatus(code = NO_CONTENT) public void handleLcn(@RequestBody VnfLifecycleChangeNotification lcn, HttpServletResponse httpResponse) { diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/SwaggerApi.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/SwaggerApi.java index 659e82fd..15c8dc36 100644 --- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/SwaggerApi.java +++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/SwaggerApi.java @@ -18,14 +18,11 @@ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.restapi; import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core.SelfRegistrationManager; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletResponse; - import java.io.IOException; import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.DriverProperties.BASE_URL; |