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/12/09 13:39:20 UTC

[GitHub] [james-project] quantranhong1999 commented on a diff in pull request #1353: JAMES-3754 IMAP SAVEDATE extension

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


##########
protocols/imap/src/main/java/org/apache/james/imap/encode/FetchResponseEncoder.java:
##########
@@ -290,6 +296,19 @@ private void encodeInternalDate(ImapResponseComposer composer, FetchResponse fet
         }
     }
 
+    private void encodeSaveDate(ImapResponseComposer composer, FetchResponse fetchResponse) throws IOException {
+        final Optional<Date> saveDate = fetchResponse.getSaveDate();
+        if (isSaveDateFetched(saveDate)) {

Review Comment:
   I needed a way to propagate whether the save date was fetched. With the current `FetchReponse`, the normal way is to use `null` to annotate it is not fetched.
   
   However, the save date value is in Optional form, so it actually could make this a bit confusing, that is why I named `isSaveDateFetched(saveDate)` for more readability.
   
   Better idea is welcome.



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