Skip to content

Commit 0755a57

Browse files
committed
Document composite rules about their thread unsafety
Resolves #320
1 parent 01d8861 commit 0755a57

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

Diff for: easy-rules-support/src/main/java/org/jeasy/rules/support/composite/ActivationRuleGroup.java

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
* rule and ignores other rules in the group (XOR logic).
3434
* Rules are first sorted by their natural order (priority by default) within the group.
3535
*
36+
* <strong>This class is not thread-safe.</strong>
37+
*
3638
* @author Mahmoud Ben Hassine ([email protected])
3739
*/
3840
public class ActivationRuleGroup extends CompositeRule {

Diff for: easy-rules-support/src/main/java/org/jeasy/rules/support/composite/CompositeRule.java

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535

3636
/**
3737
* Base class representing a composite rule composed of a set of rules.
38+
*
39+
* <strong>This class is not thread-safe.
40+
* Sub-classes are inherently not thread-safe.</strong>
3841
*
3942
* @author Mahmoud Ben Hassine ([email protected])
4043
*/

Diff for: easy-rules-support/src/main/java/org/jeasy/rules/support/composite/ConditionalRuleGroup.java

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
* priority acts as a condition: if the rule with the highest priority evaluates
3838
* to true, then we try to evaluate the rest of the rules and execute the ones
3939
* that evaluate to true.
40+
*
41+
* <strong>This class is not thread-safe.</strong>
4042
*
4143
* @author Dag Framstad ([email protected])
4244
*/

Diff for: easy-rules-support/src/main/java/org/jeasy/rules/support/composite/UnitRuleGroup.java

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
/**
3030
* A unit rule group is a composite rule that acts as a unit: Either all rules are
3131
* applied or nothing is applied (all or nothing semantic).
32+
*
33+
* <strong>This class is not thread-safe.</strong>
3234
*
3335
* @author Mahmoud Ben Hassine ([email protected])
3436
*/

0 commit comments

Comments
 (0)