Reduce the overhead of char[] creation
See gh-24204
This commit is contained in:
committed by
Stephane Nicoll
parent
c063c3434d
commit
5121ca5d17
@@ -189,7 +189,8 @@ public class ConfigurationMetadata {
|
||||
static String toDashedCase(String name) {
|
||||
StringBuilder dashed = new StringBuilder();
|
||||
Character previous = null;
|
||||
for (char current : name.toCharArray()) {
|
||||
for (int i = 0; i < name.length(); i++) {
|
||||
char current = name.charAt(i);
|
||||
if (SEPARATORS.contains(current)) {
|
||||
dashed.append("-");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user