@Override public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (MappingUtils.isDeepMapping(fieldName)) { writeDeepDestinationValue(bean, value, fieldMap); } else { if (!getPropertyType().isPrimitive() || value != null) { // Check if dest value is already set and is equal to src value. If true, no need to rewrite the dest value try { // We should map null values to create a new key in the map if (value != null && getPropertyValue(bean) == value) { return; } } catch (Exception e) { // if we failed to read the value, assume we must write, and continue... } invokeWriteMethod(bean, value); } } }
@Override public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (MappingUtils.isDeepMapping(fieldName)) { writeDeepDestinationValue(bean, value, fieldMap); } else { if (!getPropertyType().isPrimitive() || value != null) { // Check if dest value is already set and is equal to src value. // If true, no need to rewrite the dest value try { // We should map null values to create a new key in the map if (value != null && getPropertyValue(bean) == value) { return; } } catch (Exception e) { // if we failed to read the value, assume we must write, and // continue... } invokeWriteMethod(bean, value); } } }
@Override public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (MappingUtils.isDeepMapping(fieldName)) { writeDeepDestinationValue(bean, value, fieldMap); } else { if (!getPropertyType().isPrimitive() || value != null) { // Check if dest value is already set and is equal to src value. // If true, no need to rewrite the dest value try { // We should map null values to create a new key in the map if (value != null && getPropertyValue(bean) == value) { return; } } catch (Exception e) { // if we failed to read the value, assume we must write, and // continue... } invokeWriteMethod(bean, value); } } }