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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
