summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war
diff options
context:
space:
mode:
authorshrikantawachar <shrikant.awachar@amdocs.com>2017-12-27 14:51:38 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-27 11:50:54 +0000
commit3de3ffee5f36b7b34bbf1a64d6edb3e99879b0c8 (patch)
tree726f7e500f70ba44a536d565b96dbbe3b6b4b035 /openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war
parentf00a3cc3452f6d15ac107d7e2c199b02e6338329 (diff)
Fixing sonar qube issues
Fixed critical , major , minor issues in DefaultOutput class. Updated license header. Change-Id: Ie79498108433c5cc16a3adb04c6f6072724d381d Issue-ID: SDC-343 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java31
1 files changed, 15 insertions, 16 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
index 271ff45097..4f5fe39fa1 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
@@ -1,23 +1,18 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2017 European Support Limited
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=========================================================
*/
-
package org.openecomp.server.interceptors;
@@ -28,20 +23,20 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.NewCookie;
import javax.ws.rs.core.Response;
-import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.net.URI;
+import java.util.Collections;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-public class DefaultOutput extends Response implements Serializable {
+public class DefaultOutput extends Response {
private static final long serialVersionUID = 8061802931931401706L;
private final int status;
- private final transient Object entity;
+ private final Object entity;
private MultivaluedMap<String, Object> metadata;
public DefaultOutput(int s0, Object e0) {
@@ -49,6 +44,7 @@ public class DefaultOutput extends Response implements Serializable {
this.entity = e0;
}
+ @Override
public Object getEntity() {
return entity;
}
@@ -74,7 +70,7 @@ public class DefaultOutput extends Response implements Serializable {
}
@Override
- public boolean hasEntity() throws IllegalStateException {
+ public boolean hasEntity() {
return false;
}
@@ -85,6 +81,7 @@ public class DefaultOutput extends Response implements Serializable {
@Override
public void close() {
+ //close() is not implemented for DefaultOutput
}
@Override
@@ -104,7 +101,7 @@ public class DefaultOutput extends Response implements Serializable {
@Override
public Set<String> getAllowedMethods() {
- return null;
+ return Collections.emptySet();
}
@Override
@@ -134,7 +131,7 @@ public class DefaultOutput extends Response implements Serializable {
@Override
public Set<Link> getLinks() {
- return null;
+ return Collections.emptySet();
}
@Override
@@ -153,6 +150,7 @@ public class DefaultOutput extends Response implements Serializable {
return null;
}
+ @Override
public int getStatus() {
return status;
}
@@ -166,6 +164,7 @@ public class DefaultOutput extends Response implements Serializable {
this.metadata = meta;
}
+ @Override
public MultivaluedMap<String, Object> getMetadata() {
// don't worry about cloning for now
return metadata;