Arsnael commented on code in PR #1643:
URL: https://github.com/apache/james-project/pull/1643#discussion_r1261981272
##########
server/data/data-jmap-cassandra/src/main/java/org/apache/james/jmap/cassandra/filtering/RuleDTO.java:
##########
@@ -254,13 +316,13 @@ public ActionDTO getAction() {
}
public Rule toRule() {
- return Rule.builder()
+ Rule.Builder ruleBuilder = Rule.builder()
.id(Rule.Id.of(id))
.name(name)
- .condition(conditionDTO.toCondition())
- .name(name)
- .action(actionDTO.toAction())
- .build();
+ .conditionGroup(conditionGroupDTO.toConditionGroup())
+ .action(actionDTO.toAction());
+
+ return ruleBuilder.build();
Review Comment:
No need to create a temporary Rule.Builder object, you could return the all
struct directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]