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:47 UTC
[james-project] 02/02: [Refactoring] enhance the style of
Capabilities static declaration
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