Avoid regex pattern matching for simple String replacement steps

Issue: SPR-17279
This commit is contained in:
Juergen Hoeller
2018-09-17 14:22:19 +02:00
parent cc87fbcb7f
commit 34663300a6
13 changed files with 61 additions and 30 deletions

View File

@@ -292,7 +292,7 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
for (int index = 1; index <= columnCount; index++) {
String column = JdbcUtils.lookupColumnName(rsmd, index);
String field = lowerCaseName(column.replaceAll(" ", ""));
String field = lowerCaseName(StringUtils.delete(column, " "));
PropertyDescriptor pd = (this.mappedFields != null ? this.mappedFields.get(field) : null);
if (pd != null) {
try {