This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 9d0ef1f670d03f6a851965807f5d1ad69414f37d
Author: Benoit TELLIER <btell...@linagora.com>
AuthorDate: Wed Oct 9 09:31:16 2024 +0200

    JAMES-2182 ListProcessor: fix checkstyles
---
 .../src/main/java/org/apache/james/imap/processor/ListProcessor.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
 
b/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
index a74fb8c23f..2875497ce4 100644
--- 
a/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
+++ 
b/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
@@ -138,7 +138,7 @@ public class ListProcessor<T extends ListRequest> extends 
AbstractMailboxProcess
     }
 
     private Mono<Void> respond(ImapSession session, Responder responder, T 
request, MailboxSession mailboxSession) {
-        if (request.getMailboxPattern().length() == 0) {
+        if (request.getMailboxPattern().isEmpty()) {
             return Mono.fromRunnable(() -> 
respondNamespace(request.getBaseReferenceName(), responder, mailboxSession));
         } else {
             return respondMailboxList(request, session, responder, 
mailboxSession);
@@ -166,7 +166,7 @@ public class ListProcessor<T extends ListRequest> extends 
AbstractMailboxProcess
     }
 
     private String computeReferenceRoot(String referenceName, MailboxSession 
mailboxSession) {
-        if (referenceName.length() > 0 && referenceName.charAt(0) == 
MailboxConstants.NAMESPACE_PREFIX_CHAR) {
+        if (!referenceName.isEmpty() && referenceName.charAt(0) == 
MailboxConstants.NAMESPACE_PREFIX_CHAR) {
             // A qualified reference name - get the root element
             int firstDelimiter = 
referenceName.indexOf(mailboxSession.getPathDelimiter());
             if (firstDelimiter == -1) {


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

Reply via email to