Note about Undeeded Patterns
----------------------------
Key: JBRULES-2929
URL:
https://issues.jboss.org/browse/JBRULES-2929
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-verifier
Reporter: Toni Rikkola
Assignee: Toni Rikkola
Priority: Minor
Restrictions are not needed in this rule.
rule "Pattern possibility that is always true"
when
a: Restriction()
b: Restriction()
$pp: SubPattern()
Opposites(
(
left == a && right memberOf $pp.items
) && (
left == b && right memberOf $pp.items
)
)
then
insert( new AlwaysTrue( $pp, a, b ) );
end
Because it could be simply written as:
when
$pp: SubPattern()
Opposites( $left: left memberOf $pp.items &&
$right: right memberOf $pp.items )
then
insert( new AlwaysTrue( $pp, $left, $right ) );
end
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira