aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib
diff options
context:
space:
mode:
authorAbhai Singh <Abhai.Singh@amdocs.com>2017-12-28 19:13:06 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-31 10:27:15 +0000
commit1577328de998d9b921e61ac9940a016ac1bbcecd (patch)
tree5e4adea01193e24f486eeddeed94f6e4a3007ac1 /openecomp-be/lib/openecomp-sdc-validation-lib
parent76d9fa786f28e4835c55895824028bc2bb757dfa (diff)
Fix Sonar violations - ValidationTestUtil
Fixed few reported sonar issues. One sonar issue related to exception handling is ignored as it would be fixed later Change-Id: I316868b2f6634e8858696e87604e73de7c8d5e40 Issue-ID: SDC-343 Signed-off-by: Abhai Singh <Abhai.Singh@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationTestUtil.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationTestUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationTestUtil.java
index 08a3548a7d..068e147874 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationTestUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/util/ValidationTestUtil.java
@@ -26,7 +26,6 @@ import org.testng.Assert;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
-import java.io.StringWriter;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
@@ -38,9 +37,11 @@ import java.util.Objects;
*/
public class ValidationTestUtil {
- private final static Logger log = (Logger) LoggerFactory.getLogger(ValidationTestUtil.class
+ private static final Logger LOG = LoggerFactory.getLogger(ValidationTestUtil.class
.getName());
+ private ValidationTestUtil(){}
+
public static GlobalValidationContext createGlobalContextFromPath(String path) {
GlobalValidationContext globalValidationContext = new GlobalValidationContext();
Map<String, byte[]> contentMap = getContentMapByPath(path);
@@ -181,7 +182,7 @@ public class ValidationTestUtil {
CommonMethods.newInstance(validatorConf.getImplementationClass(), Validator.class);
validator.init(validatorConf.getProperties());
} catch (IllegalArgumentException iae) {
- log.debug("",iae);
+ LOG.debug("",iae);
return null;
}
return validator;
@@ -189,7 +190,6 @@ public class ValidationTestUtil {
public static Map<String, Object> getResourceMap(String configFileName) throws IOException {
URL mockResource = ValidationTestUtil.class.getResource(configFileName);
- StringWriter writer = new StringWriter();
String json = IOUtils.toString(mockResource.openStream(), "UTF-8");
return JsonUtil.json2Object(json, Map.class);
}