Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DROOLS-1139] clone EvalInvoker in EvalCondition evaluator #758

Closed
wants to merge 2 commits into from

Conversation

mariofusco
Copy link
Contributor

No description provided.

@etirelli
Copy link
Contributor

+1

@@ -302,7 +300,7 @@ protected GroupElement clone(boolean deepClone) {
GroupElement cloned = new GroupElement();
cloned.setType( this.getType() );
for ( RuleConditionElement re : children ) {
cloned.addChild( deepClone && ( re instanceof GroupElement || re instanceof Pattern ) ? re.clone() : re );
cloned.addChild( deepClone ? re.clone() : re );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etirelli I've found another failing test case. The problem was caused that it wasn't cloning the EvalCondition here. Adding a further "|| re instanceof EvalCondition" fixed the problem, but I honestly didn't understand why it shouldn't call clone() regardless of the type of the RuleConditionElement. Any clue about this? Is this fix ok or do you see any drawback?

@mariofusco
Copy link
Contributor Author

ok to test

@mariofusco
Copy link
Contributor Author

Merged by 8eadcaaff

@mariofusco mariofusco closed this Apr 26, 2016
@mariofusco mariofusco deleted the d1139 branch April 26, 2016 14:48
Rikkola pushed a commit to Rikkola/drools that referenced this pull request Jan 27, 2020
cimbalek pushed a commit to cimbalek/incubator-kie-drools that referenced this pull request Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants