BeanWrapper avoids StringIndexOutOfBoundsException for incompletely quoted keys
Issue: SPR-14293
This commit is contained in:
@@ -942,7 +942,8 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA
|
||||
actualName = propertyName.substring(0, keyStart);
|
||||
}
|
||||
String key = propertyName.substring(keyStart + PROPERTY_KEY_PREFIX.length(), keyEnd);
|
||||
if ((key.startsWith("'") && key.endsWith("'")) || (key.startsWith("\"") && key.endsWith("\""))) {
|
||||
if (key.length() > 1 && (key.startsWith("'") && key.endsWith("'")) ||
|
||||
(key.startsWith("\"") && key.endsWith("\""))) {
|
||||
key = key.substring(1, key.length() - 1);
|
||||
}
|
||||
keys.add(key);
|
||||
|
||||
Reference in New Issue
Block a user