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/12 21:37:25 UTC
[james-project] 03/15: [Refactoring] remove unused method
getAvailableCharsets
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 2abab15a43b6555fd0314aefc86a07d5acbb6c5d
Author: Matthieu Baechler <ma...@apache.org>
AuthorDate: Thu Nov 7 22:01:44 2019 +0100
[Refactoring] remove unused method getAvailableCharsets
---
.../org/apache/james/imap/api/display/CharsetUtil.java | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/api/display/CharsetUtil.java b/protocols/imap/src/main/java/org/apache/james/imap/api/display/CharsetUtil.java
index b8ec77c..c001c6f 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/api/display/CharsetUtil.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/api/display/CharsetUtil.java
@@ -34,7 +34,6 @@ import com.beetstra.jutf7.CharsetProvider;
public class CharsetUtil {
private static final Set<String> charsetNames;
- private static final Set<Charset> charsets;
private static final String X_MODIFIED_UTF_7 = "X-MODIFIED-UTF-7";
private static final Charset X_MODIFIED_UTF_7_CHARSET = new CharsetProvider().charsetForName(X_MODIFIED_UTF_7);
@@ -42,37 +41,24 @@ public class CharsetUtil {
// build the sets which holds the charsets and names
static {
Set<String> cNames = new HashSet<>();
- Set<Charset> sets = new HashSet<>();
for (Charset charset : Charset.availableCharsets().values()) {
final Set<String> aliases = charset.aliases();
cNames.add(charset.name());
cNames.addAll(aliases);
- sets.add(charset);
-
}
+
charsetNames = Collections.unmodifiableSet(cNames);
- charsets = Collections.unmodifiableSet(sets);
}
/**
* Return an unmodifiable {@link Set} which holds the names (and aliases) of all supported Charsets
- *
+ *
* @return supportedCharsetNames
*/
public static final Set<String> getAvailableCharsetNames() {
return charsetNames;
}
-
- /**
- * Return an unmodifiable {@link Set} which holds all supported Charsets
- *
- * @return supportedCharsets
- */
- public static final Set<Charset> getAvailableCharsets() {
- return charsets;
- }
-
/**
* Decode the given UTF7 encoded <code>String</code>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org