/** * Access the Object[] from the {@link DynamicEntity}. * <p> * If the length of the array is incorrect this is where it will be lazily * fixed. */ private Object[] getValues(Object entity) { Object[] values = ((DynamicEntityImpl) entity).values; if (getIndex() >= values.length) { Object[] newValues = new Object[getType().getNumberOfProperties()]; System.arraycopy(values, 0, newValues, 0, values.length); ((DynamicEntityImpl) entity).values = newValues; values = newValues; } return values; }