Commit 206ba2ad authored by Phillip Webb's avatar Phillip Webb

Append chars not ints in getLettersAndDigits

Update `StringToEnumIgnoringCaseConverterFactory` so that the
`getLettersAndDigits` method correctly appends `char` elements
rather than `int` elements.

Closes gh-17327
parent 88b6a330
......@@ -76,8 +76,8 @@ final class StringToEnumIgnoringCaseConverterFactory implements ConverterFactory
private String getLettersAndDigits(String name) {
StringBuilder canonicalName = new StringBuilder(name.length());
name.chars().map((c) -> (char) c).filter(Character::isLetterOrDigit).map(Character::toLowerCase)
.forEach(canonicalName::append);
name.chars().filter(Character::isLetterOrDigit).map(Character::toLowerCase)
.forEach((c) -> canonicalName.append((char) c));
return canonicalName.toString();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment