|
|
|
@ -291,7 +291,7 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA |
|
|
|
String lastKey = tokens.keys[tokens.keys.length - 1]; |
|
|
|
String lastKey = tokens.keys[tokens.keys.length - 1]; |
|
|
|
|
|
|
|
|
|
|
|
if (propValue.getClass().isArray()) { |
|
|
|
if (propValue.getClass().isArray()) { |
|
|
|
Class<?> requiredType = propValue.getClass().componentType(); |
|
|
|
Class<?> componentType = propValue.getClass().componentType(); |
|
|
|
int arrayIndex = Integer.parseInt(lastKey); |
|
|
|
int arrayIndex = Integer.parseInt(lastKey); |
|
|
|
Object oldValue = null; |
|
|
|
Object oldValue = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
@ -299,10 +299,9 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA |
|
|
|
oldValue = Array.get(propValue, arrayIndex); |
|
|
|
oldValue = Array.get(propValue, arrayIndex); |
|
|
|
} |
|
|
|
} |
|
|
|
Object convertedValue = convertIfNecessary(tokens.canonicalName, oldValue, pv.getValue(), |
|
|
|
Object convertedValue = convertIfNecessary(tokens.canonicalName, oldValue, pv.getValue(), |
|
|
|
requiredType, ph.nested(tokens.keys.length)); |
|
|
|
componentType, ph.nested(tokens.keys.length)); |
|
|
|
int length = Array.getLength(propValue); |
|
|
|
int length = Array.getLength(propValue); |
|
|
|
if (arrayIndex >= length && arrayIndex < this.autoGrowCollectionLimit) { |
|
|
|
if (arrayIndex >= length && arrayIndex < this.autoGrowCollectionLimit) { |
|
|
|
Class<?> componentType = propValue.getClass().componentType(); |
|
|
|
|
|
|
|
Object newArray = Array.newInstance(componentType, arrayIndex + 1); |
|
|
|
Object newArray = Array.newInstance(componentType, arrayIndex + 1); |
|
|
|
System.arraycopy(propValue, 0, newArray, 0, length); |
|
|
|
System.arraycopy(propValue, 0, newArray, 0, length); |
|
|
|
int lastKeyIndex = tokens.canonicalName.lastIndexOf('['); |
|
|
|
int lastKeyIndex = tokens.canonicalName.lastIndexOf('['); |
|
|
|
|