chibenwa commented on code in PR #2991:
URL: https://github.com/apache/james-project/pull/2991#discussion_r3049289645


##########
event-bus/api/src/main/java/org/apache/james/events/EventSerializersAggregator.java:
##########
@@ -66,8 +66,7 @@ public SerializationResult toJson(Collection<Event> events) {
     public List<DeserializationResult> asEvents(String serialized) {
         return allEventSerializers.stream()
             .map(eventSerializer -> eventSerializer.asEvents(serialized))
-            .filter(results -> 
results.stream().anyMatch(DeserializationResult::isSuccess))
-            .findFirst()
+            .reduce(DeserializationResult::reduce)

Review Comment:
   We definitly do NOT want to evaluate all serializers. This code part needs 
rework.



-- 
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]

Reply via email to