summaryrefslogtreecommitdiffstats
path: root/engine-d/src/main/java/org/openo
diff options
context:
space:
mode:
author6407000801 <feng.liang1@zte.com.cn>2017-03-16 10:53:38 +0800
committer6407000801 <feng.liang1@zte.com.cn>2017-03-16 10:53:38 +0800
commit4ced1931f4e031761d6d16484bb59a975dfcdc68 (patch)
treef5a353a1d7b6a39f20da2b800af7db5806a70068 /engine-d/src/main/java/org/openo
parent972fddd339d102b237b0647f2514cbc974414489 (diff)
Fix compileRulev2.0.0release/mercury
Change-Id: Iccf00f37ead7c330e3ca82882166b753f16a5bdb Issue-ID: HOLMES-47 Signed-off-by: FengLiang <feng.liang1@zte.com.cn>
Diffstat (limited to 'engine-d/src/main/java/org/openo')
-rw-r--r--engine-d/src/main/java/org/openo/holmes/engine/manager/DroolsEngine.java8
1 files changed, 4 insertions, 4 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 a97cae9..f8d9626 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
@@ -162,7 +162,7 @@ public class DroolsEngine {
kbuilder.add(res, ResourceType.DRL);
- judgeRuleContent(locale, kbuilder);
+ judgeRuleContent(locale, kbuilder, true);
String packageName = kbuilder.getKnowledgePackages().iterator().next().getName();
try {
@@ -210,10 +210,10 @@ public class DroolsEngine {
kbuilder.add(res, ResourceType.DRL);
- judgeRuleContent(locale, kbuilder);
+ judgeRuleContent(locale, kbuilder, false);
}
- private void judgeRuleContent(Locale locale, KnowledgeBuilder kbuilder)
+ private void judgeRuleContent(Locale locale, KnowledgeBuilder kbuilder, boolean judgePackageName)
throws CorrelationException {
if (kbuilder.hasErrors()) {
String errorMsg = I18nProxy.getInstance().getValueByArgs(locale,
@@ -225,7 +225,7 @@ public class DroolsEngine {
String packageName = kbuilder.getKnowledgePackages().iterator().next().getName();
- if (packageNames.contains(packageName)) {
+ if (packageNames.contains(packageName) && judgePackageName) {
String errorMsg = I18nProxy.getInstance().getValueByArgs(locale,
I18nProxy.ENGINE_CONTENT_ILLEGALITY, new String[]{
I18nProxy.getInstance().getValue(locale, I18nProxy.ENGINE_CONTAINS_PACKAGE)});