Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
Description
The validateUniqueRuleNamesmethod in the org.drools.compiler.PackageBuilder class currently only checks for duplicate rule names that are defined within the same resource. However, in the case where there are multiple resources added to the knowledge builder that share the same package name then the validateUniqueRuleNames method is not detecting duplicates across the package.
In cases where rules have the same name and are defined in the same package then I would have expected to get a duplicate rule error but I do not as the rules are physically reside in two separate resources.
It seems logical that in addition to checking if any rules are duplicated within the resource that it also checks to see that rule was already defined in the package registry as well. Otherwise the last rule overwrites the first and creates some rather odd behavior.
Attachments
Issue Links
- duplicates
-
JBRULES-3063 Drools should not allow set two rules with the same name for the same package
- Closed
- is related to
-
JBRULES-3063 Drools should not allow set two rules with the same name for the same package
- Closed
-
JBRULES-2221 duplicate function in different .drl files of same package silently overridden
- Resolved