aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2017-09-07 10:52:29 +0300
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-09-07 13:53:33 +0000
commitb7375b2488df93ba9df57ad13ec628bbff663819 (patch)
treee8d372535ab98aa76814e16d301ac32efbeb0c75 /openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src
parent8bd8cee7d620406036e197f540439b1e226506d5 (diff)
Fixed a few static analysis violations
Fixed mostly not closing resources (InputStream, ResultSet) and catching Throwable instead of Exception in some modules. Issue-ID: SDC-291 Change-Id: I34e331cc3b45c4bb3a71c301f50e1706a7b623fd Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src')
-rw-r--r--openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java
index 0d4cb9c0ba..0f2c0e7ee1 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-core/src/main/java/org/openecomp/sdc/healing/impl/HealingManagerImpl.java
@@ -20,20 +20,19 @@
package org.openecomp.sdc.healing.impl;
-import org.openecomp.sdc.datatypes.error.ErrorLevel;
-import org.openecomp.sdc.healing.interfaces.Healer;
import org.openecomp.core.utilities.file.FileUtils;
-import org.openecomp.sdc.healing.types.HealCode;
import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.healing.api.HealingManager;
import org.openecomp.sdc.common.errors.Messages;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.healing.api.HealingManager;
+import org.openecomp.sdc.healing.interfaces.Healer;
+import org.openecomp.sdc.healing.types.HealCode;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerErrorCode;
import org.openecomp.sdc.logging.types.LoggerErrorDescription;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
-import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.util.Map;
@@ -77,8 +76,7 @@ public class HealingManagerImpl implements HealingManager {
}
private static Map<String, String> initHealers() {
- InputStream healingConfigurationJson = FileUtils.getFileInputStream(HEALING_CONF_FILE);
- return JsonUtil.json2Object(healingConfigurationJson, Map.class);
+ return FileUtils.readViaInputStream(HEALING_CONF_FILE, stream -> JsonUtil.json2Object(stream, Map.class));
}
private Healer getHealerImplInstance(String implClassName)