Skip to content

Commit c9d341e

Browse files
authored
Simplify String construction in StringUtils.changeFirstCharacterCase()
Closes gh-27012
1 parent 950b183 commit c9d341e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/util/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ private static String changeFirstCharacterCase(String str, boolean capitalize) {
566566

567567
char[] chars = str.toCharArray();
568568
chars[0] = updatedChar;
569-
return new String(chars, 0, chars.length);
569+
return new String(chars);
570570
}
571571

572572
/**

0 commit comments

Comments
 (0)