Arsnael commented on code in PR #941:
URL: https://github.com/apache/james-project/pull/941#discussion_r844833772
##########
server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapChannelUpstreamHandler.java:
##########
@@ -240,7 +242,9 @@ public void exceptionCaught(ChannelHandlerContext ctx,
Throwable cause) throws E
}
})
.doFinally(Throwing.consumer(signal ->
super.channelInactive(ctx)))
- .subscribe(any -> {}, e -> {
+ .subscribe(any -> {
+
+ }, e -> {
Review Comment:
idem
##########
server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java:
##########
@@ -1478,6 +1478,7 @@ void idleShouldReturnUpdates() throws Exception {
readStringUntil(clientConnection, s -> s.contains("a2 OK
[READ-WRITE] SELECT completed."));
clientConnection.write(ByteBuffer.wrap(("a3
IDLE\r\n").getBytes(StandardCharsets.UTF_8)));
+ System.out.println("toto");
Review Comment:
debug spotted
##########
server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java:
##########
@@ -1747,6 +1748,7 @@ void storeShouldFailWhenSomeMessagesDoNotMatch() throws
Exception {
ImmutableList.Builder<String> result = ImmutableList.builder();
while (true) {
String line = new String(readBytes(channel),
StandardCharsets.US_ASCII);
+ System.out.println(line);
Review Comment:
debug spotted
##########
server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapIdleStateHandler.java:
##########
@@ -66,7 +66,9 @@ public void channelIdle(ChannelHandlerContext ctx,
IdleStateEvent e) throws Exce
// close the channel
.then(Mono.fromRunnable(() -> ctx.channel().close()))
.then(Mono.fromRunnable(Throwing.runnable(() ->
super.channelIdle(ctx, e))))
- .subscribe(any -> {}, ctx::fireExceptionCaught);
+ .subscribe(any -> {
+
+ }, ctx::fireExceptionCaught);
Review Comment:
idem
##########
protocols/imap/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java:
##########
@@ -109,6 +84,36 @@ protected void processRequest(ExpungeRequest request,
ImapSession session, Respo
}
}
+ private int expunge(ExpungeRequest request, ImapSession session,
MessageManager mailbox, MailboxSession mailboxSession) throws MailboxException {
+ IdRange[] ranges = request.getUidSet();
+ if (ranges == null) {
+ return expunge(mailbox, MessageRange.all(), session,
mailboxSession);
Review Comment:
indent
##########
server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapChannelUpstreamHandler.java:
##########
@@ -196,7 +196,9 @@ public void channelInactive(ChannelHandlerContext ctx)
throws Exception {
.orElse(Mono.empty())
.doFinally(signal -> imapConnectionsMetric.decrement())
.doFinally(Throwing.consumer(signal ->
super.channelInactive(ctx)))
- .subscribe(any -> {}, ctx::fireExceptionCaught);
+ .subscribe(any -> {
+
+ }, ctx::fireExceptionCaught);
Review Comment:
Was that really a problem?
##########
mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/mail/task/MemoryRecomputeCurrentQuotasServiceTest.java:
##########
@@ -1,87 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.james.mailbox.inmemory.mail.task;
-
-import static org.mockito.Mockito.mock;
-
-import org.apache.james.dnsservice.api.DNSService;
-import org.apache.james.domainlist.lib.DomainListConfiguration;
-import org.apache.james.domainlist.memory.MemoryDomainList;
-import org.apache.james.mailbox.MailboxManager;
-import org.apache.james.mailbox.SessionProvider;
-import org.apache.james.mailbox.inmemory.manager.InMemoryIntegrationResources;
-import org.apache.james.mailbox.quota.CurrentQuotaManager;
-import org.apache.james.mailbox.quota.UserQuotaRootResolver;
-import org.apache.james.mailbox.quota.task.RecomputeCurrentQuotasService;
-import
org.apache.james.mailbox.quota.task.RecomputeCurrentQuotasServiceContract;
-import org.apache.james.user.api.UsersRepository;
-import org.apache.james.user.memory.MemoryUsersRepository;
-import org.junit.jupiter.api.BeforeEach;
-
-class MemoryRecomputeCurrentQuotasServiceTest implements
RecomputeCurrentQuotasServiceContract {
Review Comment:
Why is this test class being removed in this commit? (`JAMES-3737 Rework
on/off for Frame decoder... `)
--
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]