mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -20,7 +20,6 @@ import org.dromara.hutool.core.bean.path.BeanPath;
|
||||
import org.dromara.hutool.core.convert.ConvertException;
|
||||
import org.dromara.hutool.core.convert.Converter;
|
||||
import org.dromara.hutool.core.lang.mutable.MutableEntry;
|
||||
import org.dromara.hutool.json.convert.JSONConverter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.StringWriter;
|
||||
@@ -193,6 +192,6 @@ public interface JSON extends Converter, Cloneable, Serializable {
|
||||
|
||||
@Override
|
||||
default Object convert(final Type targetType, final Object value) throws ConvertException {
|
||||
return JSONConverter.of(config()).convert(targetType, value);
|
||||
return config().getConverter().convert(targetType, value);
|
||||
}
|
||||
}
|
||||
|
@@ -61,8 +61,9 @@ public class JSONConverter implements Converter, Serializable {
|
||||
public static final JSONConverter INSTANCE = new JSONConverter(null);
|
||||
|
||||
static {
|
||||
RegisterConverter.getInstance().putCustom(JSONObject.class, INSTANCE);
|
||||
RegisterConverter.getInstance().putCustom(JSONArray.class, INSTANCE);
|
||||
final RegisterConverter converter = RegisterConverter.getInstance();
|
||||
converter.putCustom(JSONObject.class, INSTANCE);
|
||||
converter.putCustom(JSONArray.class, INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user