You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ma...@apache.org on 2019/11/08 16:47:45 UTC

[james-project] branch master updated (ebea6a8 -> 186e9bf)

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

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


    from ebea6a8  [REFACTORING] Move used class of package protocols.imap in their right imap counterpart
     new f094e39  [Refactoring] starting with Java 7, UTF-6 is guaranteed to be implemented
     new 186e9bf  [Refactoring] enhance the style of Capabilities static declaration

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../james/imap/processor/CapabilityProcessor.java  | 25 ++++++----------------
 1 file changed, 7 insertions(+), 18 deletions(-)


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


[james-project] 01/02: [Refactoring] starting with Java 7, UTF-6 is guaranteed to be implemented

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f094e3950b701c46d6085276493ee0959ba463d3
Author: Matthieu Baechler <ma...@apache.org>
AuthorDate: Thu Nov 7 18:41:56 2019 +0100

    [Refactoring] starting with Java 7, UTF-6 is guaranteed to be implemented
---
 .../java/org/apache/james/imap/processor/CapabilityProcessor.java | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java
index 6003191..3711473 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java
@@ -23,7 +23,6 @@ import static org.apache.james.imap.api.ImapConstants.SUPPORTS_CONDSTORE;
 import static org.apache.james.imap.api.ImapConstants.SUPPORTS_I18NLEVEL_1;
 import static org.apache.james.imap.api.ImapConstants.SUPPORTS_LITERAL_PLUS;
 import static org.apache.james.imap.api.ImapConstants.SUPPORTS_RFC3348;
-import static org.apache.james.imap.api.ImapConstants.UTF8;
 import static org.apache.james.imap.api.ImapConstants.VERSION;
 
 import java.io.Closeable;
@@ -34,7 +33,6 @@ import java.util.Set;
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapConfiguration;
-import org.apache.james.imap.api.display.CharsetUtil;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
@@ -55,11 +53,7 @@ public class CapabilityProcessor extends AbstractMailboxProcessor<CapabilityRequ
         caps.add(VERSION);
         caps.add(SUPPORTS_LITERAL_PLUS);
         caps.add(SUPPORTS_RFC3348);
-
-        // UTF-8 is needed for I18NLEVEL_1
-        if (CharsetUtil.getAvailableCharsetNames().contains(UTF8)) {
-            caps.add(SUPPORTS_I18NLEVEL_1);
-        }
+        caps.add(SUPPORTS_I18NLEVEL_1);
         caps.add(SUPPORTS_CONDSTORE);
         CAPS = ImmutableList.copyOf(caps);
     }


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


[james-project] 02/02: [Refactoring] enhance the style of Capabilities static declaration

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 186e9bf8e64352ebc369989cbf25f5bd182be5da
Author: Matthieu Baechler <ma...@apache.org>
AuthorDate: Thu Nov 7 18:44:15 2019 +0100

    [Refactoring] enhance the style of Capabilities static declaration
---
 .../james/imap/processor/CapabilityProcessor.java     | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java
index 3711473..33b08e9 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/CapabilityProcessor.java
@@ -46,18 +46,13 @@ import com.google.common.collect.ImmutableList;
 
 public class CapabilityProcessor extends AbstractMailboxProcessor<CapabilityRequest> implements CapabilityImplementingProcessor {
 
-    private static final List<String> CAPS;
-    
-    static {
-        List<String> caps = new ArrayList<>();
-        caps.add(VERSION);
-        caps.add(SUPPORTS_LITERAL_PLUS);
-        caps.add(SUPPORTS_RFC3348);
-        caps.add(SUPPORTS_I18NLEVEL_1);
-        caps.add(SUPPORTS_CONDSTORE);
-        CAPS = ImmutableList.copyOf(caps);
-    }
-    
+    private static final List<String> CAPS = ImmutableList.of(
+            VERSION,
+            SUPPORTS_LITERAL_PLUS,
+            SUPPORTS_RFC3348,
+            SUPPORTS_I18NLEVEL_1,
+            SUPPORTS_CONDSTORE);
+
     private final List<CapabilityImplementingProcessor> capabilities = new ArrayList<>();
     private final Set<String> disabledCaps = new HashSet<>();
     


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