diff options
Diffstat (limited to 'framework')
5 files changed, 23 insertions, 23 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java index 880f83ea..36c701ce 100644 --- a/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java +++ b/framework/src/main/java/org/onap/cli/fw/cmd/product/OnapServiceListCommand.java @@ -51,7 +51,7 @@ public class OnapServiceListCommand extends OnapCommand { } if (!rslt.containsKey(schema.getProduct())) { - rslt.put(schema.getProduct(), new HashSet<String>()); + rslt.put(schema.getProduct(), new HashSet<>()); } rslt.get(schema.getProduct()).add(schema.getService()); } @@ -71,7 +71,7 @@ public class OnapServiceListCommand extends OnapCommand { } } - for (String service : rslt.getOrDefault(product, new HashSet<String>())) { + for (String service : rslt.getOrDefault(product, new HashSet<>())) { this.getResult().getRecordsMap().get("product").getValues().add(product); this.getResult().getRecordsMap().get("service").getValues().add(service); this.getResult().getRecordsMap().get("description").getValues().add( diff --git a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java index c2ae189b..9a6a4e78 100644 --- a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java +++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java @@ -33,13 +33,13 @@ import org.slf4j.LoggerFactory; */ public class OnapCommandSchemaMerger { - static Logger LOG = LoggerFactory.getLogger(OnapCommandSchemaMerger.class); + static Logger logger = LoggerFactory.getLogger(OnapCommandSchemaMerger.class); - public static Map<String, ?> mergeSchemas(OnapCommand cmd) throws OnapCommandException { - Map<String, Object> mergedResult = new LinkedHashMap<String, Object>(); + public static Map<String, Object> mergeSchemas(OnapCommand cmd) throws OnapCommandException { + Map<String, Object> mergedResult = new LinkedHashMap<>(); for (String schema: cmd.getSchemas()) { - Map<String , Object> schemaMap = (Map<String, Object>) OnapCommandSchemaLoader.validateSchemaVersion(schema, cmd.getSchemaVersion()); + Map<String , Object> schemaMap = OnapCommandSchemaLoader.validateSchemaVersion(schema, cmd.getSchemaVersion()); mergeYamlMap(mergedResult, schemaMap); } diff --git a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java index 7352eced..839d1427 100644 --- a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java +++ b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java @@ -41,20 +41,20 @@ import org.slf4j.LoggerFactory; public class OnapCommandExecutionStore { private static Logger log = LoggerFactory.getLogger(OnapCommandExecutionStore.class); - private static boolean storeReady = false; - private static String REQUEST_ID = "requestId"; - private static String EXECUTION_ID = "executionId"; - private static String INPUT = "input"; - private static String STDOUT = "stdout"; - private static String STDERR = "stderr"; - private static String DEBUG = "debug"; - private static String IN_PROGRESS = "in-progress"; - private static String OUTPUT = "output"; - private static String ERROR = "error"; - private static String COMPLETED = "completed"; - private static String FAILED = "failed"; - private static String EXECUTIONID = "execution-id"; - private static String REQUESTID = "request-id"; + private static boolean storeReady = false; // NOSONAR + private static final String REQUEST_ID = "requestId"; + private static final String EXECUTION_ID = "executionId"; + private static final String INPUT = "input"; + private static final String STDOUT = "stdout"; + private static final String STDERR = "stderr"; + private static final String DEBUG = "debug"; + private static final String IN_PROGRESS = "in-progress"; + private static final String OUTPUT = "output"; + private static final String ERROR = "error"; + private static final String COMPLETED = "completed"; + private static final String FAILED = "failed"; + private static final String EXECUTIONID = "execution-id"; + private static final String REQUESTID = "request-id"; private SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS", Locale.US); diff --git a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandProfileStore.java b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandProfileStore.java index 39645120..732ad002 100644 --- a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandProfileStore.java +++ b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandProfileStore.java @@ -88,7 +88,7 @@ public class OnapCommandProfileStore { public void add(String productVersion, String paramName, String paramValue) { if (!paramCache.containsKey(productVersion)) { - paramCache.put(productVersion, new HashMap<String, String>()); + paramCache.put(productVersion, new HashMap<>()); } paramCache.get(productVersion).put(paramName, paramValue); diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java index 58fe7df6..dab6669c 100644 --- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java +++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java @@ -190,7 +190,7 @@ public class OnapCommandUtils { * @return */ public static String replaceLineForSpecialValues(String lineSpl) { - return replaceLineForSpecialValues(lineSpl, new HashMap<String, String>()); + return replaceLineForSpecialValues(lineSpl, new HashMap<>()); } /** @@ -410,7 +410,7 @@ public class OnapCommandUtils { } public static void copyParamsFrom(OnapCommand from, OnapCommand to) throws OnapCommandInvalidParameterValue { - copyParamsFrom(from, to, new HashMap<String, String>()); + copyParamsFrom(from, to, new HashMap<>()); } /** |