diff options
author | 2018-02-26 12:38:53 +0100 | |
---|---|---|
committer | 2018-02-26 19:11:11 +0000 | |
commit | 312e9f071ef0a8b3482278e8909f66f4c986ba89 (patch) | |
tree | 8aecf342768b9d86fb1f68bf107ef5c313b2c7f8 /appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java | |
parent | 534f94b92547efab097040209e61fa06e07f6e43 (diff) |
appc-config-generator-provider sonar fixes part 2
Sonar fixes in whole module
Change-Id: I55856a6ce73a73098dadb2c5b9428437349ed8a8
Issue-ID: APPC-671
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Diffstat (limited to 'appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java')
-rw-r--r-- | appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java b/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java index 4d4ba6bd6..6a7c8bfbc 100644 --- a/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java +++ b/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java @@ -32,6 +32,7 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; import org.onap.sdnc.config.generator.ConfigGeneratorConstant; +import org.onap.sdnc.config.generator.merge.ParameterMissingException; import org.onap.sdnc.config.generator.tool.CheckDataTool; import org.onap.sdnc.config.generator.tool.LogParserTool; @@ -47,7 +48,7 @@ public class PatternNode implements SvcLogicJavaPlugin { responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : ""; String logData = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_LOG_DATA); if (StringUtils.isBlank(logData)) { - throw new Exception("Log Data is missing"); + throw new ParameterMissingException("Log Data is missing"); } LogParserTool logParserTool = new LogParserTool(); String parsedError = logParserTool.parseErrorLog(logData); @@ -60,7 +61,7 @@ public class PatternNode implements SvcLogicJavaPlugin { ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage()); - log.error("Failed in parsing error log " + e.getMessage()); + log.error("Failed in parsing error log", e); throw new SvcLogicException(e.getMessage()); } } @@ -73,7 +74,7 @@ public class PatternNode implements SvcLogicJavaPlugin { responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : ""; String checkData = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_CHECK_DATA); if (StringUtils.isBlank(checkData)) { - throw new Exception("Check Data is missing"); + throw new ParameterMissingException("Check Data is missing"); } String dataType = CheckDataTool.checkData(checkData); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_DATA_TYPE, @@ -85,9 +86,8 @@ public class PatternNode implements SvcLogicJavaPlugin { ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage()); - log.error("Failed in checkDataType " + e.getMessage()); + log.error("Failed in checkDataType", e); throw new SvcLogicException(e.getMessage()); } } - } |