From b6831eb583cd12b776900c06a32bed4835d109e3 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 5 Feb 2018 20:40:34 +0530 Subject: Make Closable objects are used latter Issue-ID: CLI-50 Change-Id: I5e54f97ca359ee008a1ef82804b47a4e42231cc3 Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'framework/src/main') 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 errors = new ArrayList<>(); if (includeDefault) { - Map defaultParameterMap = includeDefault ? - validateSchemaVersion(DEFAULT_PARAMETER_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>(); + Map 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); } -- cgit 1.2.3-korg