quantranhong1999 commented on code in PR #1276:
URL: https://github.com/apache/james-project/pull/1276#discussion_r1006684534


##########
third-party/rspamd/src/main/java/org/apache/james/rspamd/task/GetMailboxMessagesService.java:
##########
@@ -109,8 +109,8 @@ private Flux<MessageResult> 
getMailboxMessagesOfAUser(Username username, Mailbox
         return 
Mono.from(mailboxManager.getMailboxReactive(mailboxMetaData.getId(), 
mailboxSession))
             .map(Throwing.function(MessageManager::getMailboxEntity))
             .flatMapMany(Throwing.function(mailbox -> 
mapperFactory.getMessageMapper(mailboxSession).findInMailboxReactive(mailbox, 
MessageRange.all(), MessageMapper.FetchType.METADATA, UNLIMITED)))
-            .doOnNext(mailboxMessageMetaData -> 
context.incrementHamMessageCount())
             .filter(mailboxMessageMetaData -> afterDate.map(date -> 
mailboxMessageMetaData.getInternalDate().after(date)).orElse(true))

Review Comment:
   BTW I don't think we are accepting creating an object with null internal 
date (throw NPE like this) but predicate checking instead (throwing some 
IllegalArgumentException). Anyway, let's say RuntimeException generally and 
these tests are mainly proving what happened with a null internal date in the 
pre-prod Cassandra table.



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