Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Feb 15, 2025
1 parent 13d65a1 commit 4f05408
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/org/apache/commons/codec/Charsets.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public class Charsets {
*
* @param charset
* A charset or null.
* @return the given Charset or the default Charset if the given Charset is null
* @return the given Charset or the default Charset if the given Charset is null.
*/
public static Charset toCharset(final Charset charset) {
return charset == null ? Charset.defaultCharset() : charset;
Expand All @@ -150,11 +150,9 @@ public static Charset toCharset(final Charset charset) {
/**
* Returns a Charset for the named charset. If the name is null, return the default Charset.
*
* @param charset
* The name of the requested charset, may be null.
* @param charset The name of the requested charset, may be null.
* @return a Charset for the named charset
* @throws java.nio.charset.UnsupportedCharsetException
* If the named charset is unavailable
* @throws java.nio.charset.UnsupportedCharsetException If the named charset is unavailable
*/
public static Charset toCharset(final String charset) {
return charset == null ? Charset.defaultCharset() : Charset.forName(charset);
Expand Down

0 comments on commit 4f05408

Please sign in to comment.