diff options
author | Lizi <li.zi30@zte.com.cn> | 2018-02-06 06:21:00 +0000 |
---|---|---|
committer | Lizi <li.zi30@zte.com.cn> | 2018-02-06 06:25:07 +0000 |
commit | 06ef81a00bde473248f4e447d48ce0c4dc1ce993 (patch) | |
tree | 30a2448af1e048d29379f0f8b53427b2d4d97e83 /esr-mgr | |
parent | 9770fc1f6ba50a4607f248f37c100785007ba7e1 (diff) |
Fix the sonar issue.
Change-Id: I6894d0773ef37acea819897cd80a4aa0d2b785af
Issue-ID: AAI-734
Signed-off-by: Lizi <li.zi30@zte.com.cn>
Diffstat (limited to 'esr-mgr')
4 files changed, 1 insertions, 27 deletions
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java b/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java index 15231b9..902fc18 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/exception/ExtsysException.java @@ -18,24 +18,6 @@ package org.onap.aai.esr.exception; public class ExtsysException extends Exception { private static final long serialVersionUID = 1L; - private String errorCode; - private String errorMsg; - - public String getErrorCode() { - return errorCode; - } - - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - } - - public String getErrorMsg() { - return errorMsg; - } - - public void setErrorMsg(String errorMsg) { - this.errorMsg = errorMsg; - } public ExtsysException() { super(); diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ThirdpartySdncRegisterProvider.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ThirdpartySdncRegisterProvider.java index a9b89a5..8ddf79d 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ThirdpartySdncRegisterProvider.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ThirdpartySdncRegisterProvider.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.io.OutputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.MessageBodyWriter; diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/cloud/VimUpdateProvider.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/cloud/VimUpdateProvider.java index 1a05993..4a2357e 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/cloud/VimUpdateProvider.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/cloud/VimUpdateProvider.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.io.OutputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.MessageBodyWriter; @@ -44,7 +43,7 @@ public class VimUpdateProvider implements MessageBodyWriter<Tenant> { @Override public void writeTo(Tenant t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) - throws IOException, WebApplicationException { + throws IOException { String json = new Gson().toJson(t, Tenant.class); logger.info("the param to update VIM input is:" + json); entityStream.write(json.getBytes("UTF-8")); diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java index e3ae403..a990a21 100644 --- a/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java +++ b/esr-mgr/src/test/java/org/onap/aai/esr/exception/ExtsysExceptionTest.java @@ -22,12 +22,6 @@ public class ExtsysExceptionTest { @Test
public void testAllMethods() {
- ExtsysException esExp = new ExtsysException();
- esExp.setErrorCode("498");
- Assert.assertEquals(esExp.getErrorCode(), "498");
-
- esExp.setErrorMsg("Exception from JUnit");
- Assert.assertEquals(esExp.getErrorMsg(), "Exception from JUnit");
ExtsysException oneArgExp = new ExtsysException("Exception from JUnit");
Assert.assertEquals(oneArgExp.getMessage(), "Exception from JUnit");
|