diff options
Diffstat (limited to 'framework/src/main/java')
5 files changed, 8 insertions, 5 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java b/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java index 1c90e9a0..90f8c468 100644 --- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java +++ b/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java @@ -26,7 +26,7 @@ public class OnapCommandInvalidRegistration extends OnapCommandException { private static final long serialVersionUID = 7722163282274482532L; - public OnapCommandInvalidRegistration(Class cls) { + public OnapCommandInvalidRegistration(Class<?> cls) { super("0x2001", "Invalid commad class " + cls.getCanonicalName() + " registration, it should be derived from " + OnapCommand.class.getCanonicalName()); } diff --git a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java index 09050c6c..c548f6dc 100644 --- a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java +++ b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java @@ -290,6 +290,6 @@ public class OnapCommandPrint { throw new OnapCommandOutputPrintingFailed(e); // NOSONAR } */ - return ""; + return ""; //NOSONAR } } 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 9a6a4e78..0712603a 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 @@ -35,6 +35,10 @@ public class OnapCommandSchemaMerger { static Logger logger = LoggerFactory.getLogger(OnapCommandSchemaMerger.class); + private OnapCommandSchemaMerger(){ + //It is made private in order to resolve: Utility classes should not have public constructors + } + public static Map<String, Object> mergeSchemas(OnapCommand cmd) throws OnapCommandException { Map<String, Object> mergedResult = new LinkedHashMap<>(); 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 839d1427..774e1fd7 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 @@ -453,8 +453,7 @@ public class OnapCommandExecutionStore { private File getExecutionDir(String executionId) throws OnapCommandExecutionNotFound { File []f = new File(getBasePath()).listFiles((dir, name) -> { - if (name.startsWith(executionId)) return true; - return false; + return name.startsWith(executionId); }); if (f.length == 0) { diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java index 614eb2a9..923ae243 100644 --- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java +++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java @@ -480,7 +480,7 @@ public class OnapCommandDiscoveryUtils { public static List<Map<String, Object>> createTestSuite(String cmd, String version) throws OnapCommandException { - ArrayList<Map<String, Object>> testSamples = new ArrayList(); + ArrayList<Map<String, Object>> testSamples = new ArrayList<>(); List<Resource> resources = new ArrayList<>(); |