garydgregory commented on a change in pull request #120:
URL: https://github.com/apache/commons-io/pull/120#discussion_r438400351
##########
File path: src/main/java/org/apache/commons/io/Charsets.java
##########
@@ -71,16 +85,8 @@
* @see Charset#availableCharsets()
* @since 2.5
*/
- public static SortedMap<String, Charset> requiredCharsets() {
- // maybe cache?
- final TreeMap<String, Charset> m = new
TreeMap<>(String.CASE_INSENSITIVE_ORDER);
- m.put(StandardCharsets.ISO_8859_1.name(), StandardCharsets.ISO_8859_1);
- m.put(StandardCharsets.US_ASCII.name(), StandardCharsets.US_ASCII);
- m.put(StandardCharsets.UTF_16.name(), StandardCharsets.UTF_16);
- m.put(StandardCharsets.UTF_16BE.name(), StandardCharsets.UTF_16BE);
- m.put(StandardCharsets.UTF_16LE.name(), StandardCharsets.UTF_16LE);
- m.put(StandardCharsets.UTF_8.name(), StandardCharsets.UTF_8);
- return Collections.unmodifiableSortedMap(m);
+ public static Map<String, Charset> requiredCharsets() {
Review comment:
@LinuxClient
You cannot change the return type in this manner as it breaks binary
compatibility,
----------------------------------------------------------------
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:
[email protected]