summaryrefslogtreecommitdiffstats
path: root/engine-d/src/main/java/org
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2017-02-24 15:01:18 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2017-02-24 15:01:18 +0800
commitfada906058895412557bdddf11c8850ff5ed4369 (patch)
tree0a9bda38c007b6e5ef98226b7ab2b7b7eccf195c /engine-d/src/main/java/org
parent541f0bf80602eeaa8f43bd5e88afa9b116772976 (diff)
Solve the Critical Issue in Sonar
Change-Id: I12231dfef13215b8eb7ddec2224780dc62c46c54 Issue-ID: HOLMES-47 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d/src/main/java/org')
-rw-r--r--engine-d/src/main/java/org/openo/holmes/engine/manager/DroolsEngine.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine-d/src/main/java/org/openo/holmes/engine/manager/DroolsEngine.java b/engine-d/src/main/java/org/openo/holmes/engine/manager/DroolsEngine.java
index 4ae66df..b6d867f 100644
--- a/engine-d/src/main/java/org/openo/holmes/engine/manager/DroolsEngine.java
+++ b/engine-d/src/main/java/org/openo/holmes/engine/manager/DroolsEngine.java
@@ -91,7 +91,7 @@ public class DroolsEngine {
// 2. start mq listener
registerAlarmTopicListener();
} catch (Exception e) {
- log.error("Start service failed: " + e.getMessage());
+ log.error("Start service failed: " + e.getMessage(), e);
throw ExceptionUtil.buildExceptionResponse("Start service failed!");
}
}
@@ -108,15 +108,15 @@ public class DroolsEngine {
private void start() throws EngineException, RuleIllegalityException, DbException {
- log.info("Drools Egine Initialize Begining ... ");
+ log.info("Drools Engine Initialize Beginning...");
initEngineParameter();
initDeployRule();
- log.info("Business Rule Egine Initialize Successfully ");
+ log.info("Business Rule Engine Initialize Successfully.");
}
- public void stop() throws Exception {
+ public void stop() {
this.ksession.dispose();
}
@@ -137,7 +137,7 @@ public class DroolsEngine {
private void initDeployRule() throws RuleIllegalityException, EngineException, DbException {
List<CorrelationRule> rules = ruleMgtWrapper.queryRuleByEnable(ENABLE);
- if (rules.size() > 0) {
+ if (!rules.isEmpty()) {
for (CorrelationRule rule : rules) {
if (rule.getContent() != null) {
deployRuleFromCache(rule.getContent());
@@ -284,7 +284,7 @@ public class DroolsEngine {
}
}
} catch (JMSException e) {
- log.error("connection mq service Failed: " + e.getMessage());
+ log.error("connection mq service Failed: " + e.getMessage(), e);
}
}