Skip to content

Commit e46146c

Browse files
committed
Normalize on 'charsetName' as a parameter name since this is the named
used in the JRE for Charset.forName(String). - Use 'charset' instead of 'encoding' Charset parameter names. - Fix 1 checkstyle issue.
1 parent 63fec37 commit e46146c

6 files changed

Lines changed: 209 additions & 210 deletions

File tree

src/main/java/org/apache/commons/io/Charsets.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ public static Charset toCharset(final Charset charset) {
9797
/**
9898
* Returns a Charset for the named charset. If the name is null, return the default Charset.
9999
*
100-
* @param charset
100+
* @param charsetName
101101
* The name of the requested charset, may be null.
102102
* @return a Charset for the named charset
103103
* @throws java.nio.charset.UnsupportedCharsetException
104104
* If the named charset is unavailable
105105
*/
106-
public static Charset toCharset(final String charset) {
107-
return charset == null ? Charset.defaultCharset() : Charset.forName(charset);
106+
public static Charset toCharset(final String charsetName) {
107+
return charsetName == null ? Charset.defaultCharset() : Charset.forName(charsetName);
108108
}
109109

110110
/**

0 commit comments

Comments
 (0)