aboutsummaryrefslogtreecommitdiffstats
path: root/validate
diff options
context:
space:
mode:
authorjitendra007 <jitendra.sharma1@huawei.com>2020-06-18 16:25:39 +0530
committerpriyanka.akhade <priyanka.akhade@huawei.com>2020-07-09 13:06:31 +0530
commit5f23e02caa5ab128a4c01866dec91eaea8dc7cee (patch)
treeca3c4f31dc56ce64aa9c0165b8cac4dab8e70b7c /validate
parentc3391bef9e04c2ad38ed96bd28a5c43ab6d961de (diff)
Fixed sonarcloud issues
Issue-ID: CLI-270 Signed-off-by: jitendra007 <jitendra.sharma1@huawei.com> Change-Id: Ibb52afb2fe8fe7c9be4299d1a1cb1e3d32ab0eca
Diffstat (limited to 'validate')
-rw-r--r--validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockJsonGenerator.java4
-rw-r--r--validate/sample-yaml-generator/src/main/java/org/onap/cli/sample/yaml/SampleYamlGenerator.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockJsonGenerator.java b/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockJsonGenerator.java
index ffc7c7e3..780ad695 100644
--- a/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockJsonGenerator.java
+++ b/validate/sample-mock-generator/src/main/java/org/onap/cli/http/mock/MockJsonGenerator.java
@@ -25,7 +25,9 @@ import java.io.FileWriter;
public class MockJsonGenerator {
private static Gson gson = new GsonBuilder().serializeNulls().create();
-
+ private MockJsonGenerator() {
+ throw new IllegalStateException("Utility class");
+ }
public static void generateMocking(MockRequest mockRequest, MockResponse mockResponse, String jsonFilePath) throws IOException {
MockObject mockObject = new MockObject();
diff --git a/validate/sample-yaml-generator/src/main/java/org/onap/cli/sample/yaml/SampleYamlGenerator.java b/validate/sample-yaml-generator/src/main/java/org/onap/cli/sample/yaml/SampleYamlGenerator.java
index bc8f456e..48ae7db4 100644
--- a/validate/sample-yaml-generator/src/main/java/org/onap/cli/sample/yaml/SampleYamlGenerator.java
+++ b/validate/sample-yaml-generator/src/main/java/org/onap/cli/sample/yaml/SampleYamlGenerator.java
@@ -26,7 +26,9 @@ import java.util.stream.Collectors;
public class SampleYamlGenerator {
static int nTab;
-
+ private SampleYamlGenerator() {
+ throw new IllegalStateException("Utility class");
+ }
public static void generateSampleYaml(String cmdName, List<String> input, String output, String version,
String targetPath, boolean debug, String name) throws IOException {