kinow commented on code in PR #903:
URL: https://github.com/apache/commons-lang/pull/903#discussion_r1067443008


##########
src/main/java/org/apache/commons/lang3/CharUtils.java:
##########
@@ -114,6 +114,33 @@ public static Character toCharacterObject(final String 
str) {
         return StringUtils.isEmpty(str) ? null : 
Character.valueOf(str.charAt(0));
     }
 
+    /**
+     * <p>Converts the String to a Character using the first character, 
returning a
+     *  default value if {@code null} or empty is passed in.</p>
+     *
+     * <p>For ASCII 7 bit characters, this uses a cache that will return the
+     * same Character object each time.</p>
+     *
+     * <pre>
+     *   CharUtils.toCharacterObject(null, 'A') = 'A'
+     *   CharUtils.toCharacterObject("", 'A')   = 'A'
+     *   CharUtils.toCharacterObject("A", 'D')  = 'A'
+     *   CharUtils.toCharacterObject("BA", 'D') = 'B'
+     * </pre>
+     *
+     * @param str  the character to convert

Review Comment:
   Also worth checking if the docs are ending sentences with dot or without it. 
I think this `@param` doesn't use that, but the next ones does.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

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

Reply via email to