Use scalarType.format(value) removing scalarType.jsonMapper(value)

Remove scalarType.jsonMapper(value) as we can just use format(value) instead
This commit is contained in:
rbygrave
2021-07-29 11:52:15 +12:00
parent 92d7a7562f
commit 86483ff947
3 changed files with 1 additions and 10 deletions
@@ -35,7 +35,7 @@ public class BeanPropertyJsonMapper extends BeanProperty {
@Override
boolean isDirtyValue(Object value, EntityBeanIntercept ebi) {
// dirty detection based on md5 hash of json content
final String json = scalarType.jsonMapper(value);
final String json = scalarType.format(value);
final MutableHash oldHash = ebi.mutableHash(propertyIndex);
if (oldHash == null || !oldHash.isEqualToJson(json)) {
ebi.mutableContent(propertyIndex, json); // so we only convert to json once
@@ -66,11 +66,6 @@ class ScalarTypeJsonObjectMapper {
return true;
}
@Override
public String jsonMapper(Object value) {
return formatValue(value);
}
@Override
public Object read(DataReader reader) throws SQLException {
String json = reader.getString();