You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you decided to extend the BasicRule class, you can specify rule priority at construction time or by overriding the getPriority() method
Setting the priority via constructor achieves a correct order of my rules. great!
if I extend from BasicRule.class and overwrite the getPriority()-method only and using the default-constructor fo the concrete class, in case of sorting the value that is returned by this method is always compared against DEFAULT_RULE_PRIORITY-value. So the order doesn't depend on the specified priority.
I think the problem is the compareTo-implementation in the BasicRule.class
maybe if (priority < rule.getPriority()) {
should better be if (getPriority() < rule.getPriority()) {
} else if (priority > rule.getPriority()) {
should better be } else if (getPriority() > rule.getPriority()) {
for me extending the BasicRule.class with the current implementation and overwriting the getPriority()-method in the concrete class doesn't achieve a correct sort sequence?!
The text was updated successfully, but these errors were encountered:
Hi,
you wrote in your documentation:
Setting the priority via constructor achieves a correct order of my rules. great!
if I extend from BasicRule.class and overwrite the getPriority()-method only and using the default-constructor fo the concrete class, in case of sorting the value that is returned by this method is always compared against DEFAULT_RULE_PRIORITY-value. So the order doesn't depend on the specified priority.
I think the problem is the compareTo-implementation in the BasicRule.class
maybe
if (priority < rule.getPriority()) {
should better be
if (getPriority() < rule.getPriority()) {
} else if (priority > rule.getPriority()) {
should better be
} else if (getPriority() > rule.getPriority()) {
for me extending the BasicRule.class with the current implementation and overwriting the getPriority()-method in the concrete class doesn't achieve a correct sort sequence?!
The text was updated successfully, but these errors were encountered: