}
if (valueType == null) {
throw new IllegalAccessException("Unable to determine the valueType for the rule field (" + populateValueRequest.getProperty().getName() + ")");
}
if (ValueAssignable.class.isAssignableFrom(valueType)) {
ValueAssignable assignableValue;
try {
assignableValue = (ValueAssignable) populateValueRequest.getFieldManager().getFieldValue(instance, populateValueRequest.getProperty().getName());
} catch (FieldNotAvailableException e) {
throw new IllegalArgumentException(e);
}
String key = populateValueRequest.getProperty().getName().substring(populateValueRequest.getProperty().getName().indexOf(FieldManager.MAPFIELDSEPARATOR) + FieldManager.MAPFIELDSEPARATOR.length(), populateValueRequest.getProperty().getName().length());
boolean persistValue = false;
boolean setOnParent = false;
if (assignableValue == null) {
assignableValue = (ValueAssignable) valueType.newInstance();
persistValue = true;
setOnParent = true;
dirty = true;
} else {
dirty = assignableValue.getValue().equals(populateValueRequest.getProperty().getValue());
populateValueRequest.getProperty().setOriginalValue(String.valueOf(assignableValue));
populateValueRequest.getProperty().setOriginalDisplayValue(String.valueOf(assignableValue));
}
assignableValue.setName(key);
assignableValue.setValue(populateValueRequest.getProperty().getValue());
String fieldName = populateValueRequest.getProperty().getName().substring(0, populateValueRequest.getProperty().getName().indexOf(FieldManager.MAPFIELDSEPARATOR));
Field field = populateValueRequest.getFieldManager().getField(instance.getClass(), fieldName);
FieldInfo fieldInfo = buildFieldInfo(field);
String manyToField = null;
if (populateValueRequest.getMetadata().getManyToField() != null) {