chibenwa commented on code in PR #2871:
URL: https://github.com/apache/james-project/pull/2871#discussion_r2578451711
##########
mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/dao/PostgresMailboxMessageDAOUtils.java:
##########
@@ -174,15 +175,9 @@ public long size() {
};
Function<MessageMapper.FetchType, PostgresMailboxMessageFetchStrategy>
FETCH_TYPE_TO_FETCH_STRATEGY = fetchType -> {
- switch (fetchType) {
- case METADATA:
- case ATTACHMENTS_METADATA:
- return PostgresMailboxMessageFetchStrategy.METADATA;
- case HEADERS:
- case FULL:
- return PostgresMailboxMessageFetchStrategy.FULL;
- default:
- throw new RuntimeException("Unknown FetchType " + fetchType);
+ if (Objects.requireNonNull(fetchType) ==
MessageMapper.FetchType.METADATA) {
+ return PostgresMailboxMessageFetchStrategy.METADATA;
}
+ return PostgresMailboxMessageFetchStrategy.FULL;
Review Comment:
No. Headers are indeed needed.
--
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]