summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java5
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java2
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java3
3 files changed, 4 insertions, 6 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
index bcf93269..b47000a1 100644
--- a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
@@ -145,8 +145,7 @@ public class OnapCommandSchemaLoader {
try {
List<String> errors = new ArrayList<>();
if (includeDefault) {
- Map<String, ?> defaultParameterMap = includeDefault ?
- validateSchemaVersion(DEFAULT_PARAMETER_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
+ Map<String, ?> defaultParameterMap = validateSchemaVersion(DEFAULT_PARAMETER_FILE_NAME, cmd.getSchemaVersion());
//mrkanag default_parameter is supported only for parameters.
if (defaultParameterMap.containsKey(INFO)) {
defaultParameterMap.remove(OnapCommandConstants.INFO);
@@ -508,7 +507,7 @@ public class OnapCommandSchemaLoader {
public static InputStream loadSchemaFromFile(String schemaLocation) throws OnapCommandInvalidSchema {
File schemaFile = new File(schemaLocation);
try {
- FileInputStream inputFileStream = new FileInputStream(schemaFile);
+ FileInputStream inputFileStream = new FileInputStream(schemaFile); // NOSONAR
if (!schemaFile.isFile()) {
throw new OnapCommandInvalidSchema(schemaFile.getName(), SCHEMA_FILE_NOT_EXIST);
}
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
index 5b6df29d..3e03efa7 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
@@ -129,7 +129,7 @@ public class OnapHttpConnection {
this.httpClient = HttpClients.custom().setConnectionManager(connManager)
.setRedirectStrategy(new LaxRedirectStrategy()).build();
} else {
- this.httpClient = HttpClients.createDefault();
+ this.httpClient = HttpClients.createDefault(); // NOSONAR
}
} catch (Exception e) {
throw new OnapCommandHttpFailure(e);
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
index 09dac49a..4af591ae 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
@@ -52,8 +52,7 @@ public class OnapCommandSchemaHttpLoader {
try {
List<String> errors = new ArrayList<>();
if (includeDefault) {
- Map<String, ?> defaultParameterMap = includeDefault ?
- OnapCommandSchemaLoader.validateSchemaVersion(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
+ Map<String, ?> defaultParameterMap = OnapCommandSchemaLoader.validateSchemaVersion(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion());
//mrkanag default_parameter is supported only for parameters.
if (defaultParameterMap.containsKey(OnapCommandConstants.INFO)) {