chibenwa commented on code in PR #2696:
URL: https://github.com/apache/james-project/pull/2696#discussion_r2023252193
##########
server/mailet/mailetcontainer-impl/src/main/java/org/apache/james/mailetcontainer/lib/AbstractStateCompositeProcessor.java:
##########
@@ -151,13 +150,17 @@ private void checkProcessors() throws
ConfigurationException {
}
}
- private Stream<ProcessingState> requiredProcessorStates(Mailet mailet) {
- return Stream.concat(mailet.requiredProcessingState().stream(),
- Stream.of(
- mailet.onMailetException(),
- mailet.onMatchException())
- .flatMap(Optional::stream)
- .map(ProcessingState::new));
+ private Stream<ProcessingState> requiredProcessorStates(MatcherMailetPair
matcherMailetPair) {
+ var mailet = matcherMailetPair.getMailet();
+
+ return Stream.concat(
+ mailet.requiredProcessingState().stream(),
+ Stream.of(
+ matcherMailetPair.onMailetException(),
+ matcherMailetPair.onMatchException()
+ ).flatMap(Optional::stream)
+ .map(ProcessingState::new)
+ );
Review Comment:
```
Stream.of(
matcherMailetPair.onMailetException(),
matcherMailetPair.onMatchException())
.flatMap(Optional::stream)
.map(ProcessingState::new));
```
--
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]