You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2026/06/14 11:46:10 UTC
(commons-text) branch master updated: Internal refactoring
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push:
new 95a80fc2 Internal refactoring
95a80fc2 is described below
commit 95a80fc24d4f787711ef69cfc1c967fd1057e073
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jun 14 11:46:03 2026 +0000
Internal refactoring
---
src/main/java/org/apache/commons/text/WordUtils.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/WordUtils.java b/src/main/java/org/apache/commons/text/WordUtils.java
index f76f0288..e03024a4 100644
--- a/src/main/java/org/apache/commons/text/WordUtils.java
+++ b/src/main/java/org/apache/commons/text/WordUtils.java
@@ -247,12 +247,8 @@ public class WordUtils {
* @param delimiters set of characters to determine capitalization, null means whitespace.
* @return capitalized String, {@code null} if null String input.
*/
- public static String capitalizeFully(String str, final char... delimiters) {
- if (StringUtils.isEmpty(str)) {
- return str;
- }
- str = str.toLowerCase(Locale.ROOT);
- return capitalize(str, delimiters);
+ public static String capitalizeFully(final String str, final char... delimiters) {
+ return StringUtils.isEmpty(str) ? str : capitalize(str.toLowerCase(Locale.ROOT), delimiters);
}
/**