You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/06/10 08:07:22 UTC

[GitHub] [commons-io] michael-o commented on a change in pull request #120: Add caching for required charsets and cleanup code

michael-o commented on a change in pull request #120:
URL: https://github.com/apache/commons-io/pull/120#discussion_r437937062



##########
File path: src/main/java/org/apache/commons/io/Charsets.java
##########
@@ -59,6 +59,17 @@
     // correctly and without delay on all Java platforms.
     //
 
+    private static final TreeMap<String, Charset> REQUIRED_CHARSETS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);

Review comment:
       Use the interface name

##########
File path: src/main/java/org/apache/commons/io/Charsets.java
##########
@@ -72,15 +83,7 @@
      * @since 2.5
      */
     public static SortedMap<String, Charset> requiredCharsets() {

Review comment:
       Why sorted map? TreeMap is sorted already?!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org