diff options
author | youbowu <wu.youbo@zte.com.cn> | 2017-03-02 16:02:59 +0800 |
---|---|---|
committer | 6092002067 <wu.youbo@zte.com.cn> | 2017-03-02 16:02:59 +0800 |
commit | e9257d9ddcf42d367997443259f345d8b1b301ff (patch) | |
tree | e700573612c95b28ece73834263d639115405503 /rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java | |
parent | 7cbac177f8d733c8a2103b966f51a3afe4c2123c (diff) |
Fix in rule management the sonar detected error
Issue-ID:HOLMES-50
Change-Id: Ic61e8137521617188fae1d149aad40c88b65e684
Signed-off-by: youbowu <wu.youbo@zte.com.cn>
Diffstat (limited to 'rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java')
-rw-r--r-- | rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java b/rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java index 075da00..d77cc09 100644 --- a/rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java +++ b/rulemgt/src/main/java/org/openo/holmes/rulemgt/db/CorrelationRuleQueryDao.java @@ -117,11 +117,8 @@ public class CorrelationRuleQueryDao { }
}
}
- if (whereSql.indexOf("AND") > -1) {
- whereSql = whereSql.trim();
- return whereSql.substring(0, whereSql.length() - "AND".length());
- }
- return "";
+ whereSql = whereSql.trim();
+ return whereSql.substring(0, whereSql.length() - "AND".length());
} catch (Exception e) {
throw new CorrelationException(I18nProxy.RULE_MANAGEMENT_CREATE_QUERY_SQL_FAILED, e);
}
|