aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/sdnr
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-05-10 09:53:23 -0400
committerJim Hahn <jrh3@att.com>2021-05-10 11:07:36 -0400
commit6372b62fcd8813d7d49fb279b933ffe2e4637048 (patch)
tree5d221f640ece91ce331f56d7bb6537a4393def3a /models-interactions/model-impl/sdnr
parentda708d64dc27f36ed5da733fca14ebfb4cc2832b (diff)
Fix sonars in policy-models impls & simulators
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: I65da54cae5a58966f21f981c6cea1259bfdf4239 Signed-off-by: Jim Hahn <jrh3@att.com> simulators Change-Id: I1144568485e62e0c72194caaf21ebf1ba88a6fef Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-impl/sdnr')
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java3
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
index 35a85d779..90864d42c 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
@@ -5,6 +5,7 @@
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
* Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,7 +60,7 @@ public class PciResponseCode implements Serializable {
* @return the string value equivalent of the SDNR response code
*/
public static String toResponseValue(int code) {
- StatusCodeEnum statusCodeEnum = StatusCodeEnum.fromStatusCode(code);
+ var statusCodeEnum = StatusCodeEnum.fromStatusCode(code);
return (statusCodeEnum != null) ? statusCodeEnum.toString() : null;
}
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
index a5e4336da..90aea71ee 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
@@ -57,7 +57,7 @@ public final class Serialization {
@Override
public JsonElement serialize(PciRequest src, Type typeOfSrc, JsonSerializationContext context) {
JsonElement requestJson = gsonPretty.toJsonTree(src, PciRequest.class);
- JsonObject input = new JsonObject();
+ var input = new JsonObject();
input.add("input", requestJson);
return input;
@@ -74,7 +74,7 @@ public final class Serialization {
@Override
public JsonElement serialize(PciResponse src, Type typeOfSrc, JsonSerializationContext context) {
JsonElement responseJson = gsonPretty.toJsonTree(src, PciResponse.class);
- JsonObject output = new JsonObject();
+ var output = new JsonObject();
output.add("output", responseJson);
return output;
}