You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/05/05 00:24:42 UTC

[GitHub] [james-project] chibenwa commented on a diff in pull request #986: JAMES-3762 Reworks MailRepository contract to use MailKeys instead of Mails

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


##########
server/mailrepository/mailrepository-api/src/test/java/org/apache/james/mailrepository/MailRepositoryContract.java:
##########
@@ -206,19 +206,19 @@ default void shouldPreserveDsnParameters() throws Exception {
         Mail mail = createMail(MAIL_1);
         mail.setDsnParameters(dsnParameters);
 
-        testee.store(mail);
+        var key = testee.store(mail);
 
-        assertThat(testee.retrieve(MAIL_1).dsnParameters()).contains(dsnParameters);
+        assertThat(testee.retrieve(key).dsnParameters()).contains(dsnParameters);
     }
 
     @Test
     default void retrieveShouldReturnNullAfterRemoveAll() throws Exception {
         MailRepository testee = retrieveRepository();
-        testee.store(createMail(MAIL_1));
+        var key = testee.store(createMail(MAIL_1));

Review Comment:
   I thought we once upon a time decided to not use `var` as it looses type explicitness.
   
   



##########
server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingService.java:
##########
@@ -86,12 +86,12 @@ static class Reprocessor implements Closeable {
             this.configuration = configuration;
         }
 
-        private void reprocess(MailRepository repository, Mail mail) {
+        private void reprocess(MailRepository repository, Mail mail, MailKey key) {

Review Comment:
   If we have the mail we have the key? IE this method signature can likely stay the same.



-- 
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: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org