mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-05 10:24:40 +00:00
perf[storage]: simplified method
This commit is contained in:
@@ -29,7 +29,7 @@ public class ArrayConverter implements ConditionalGenericConverter {
|
||||
|
||||
@Override
|
||||
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
|
||||
return sourceType.getType() == String.class && targetType.getType().isArray();
|
||||
return sourceType.getType() == String.class && targetType.isArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.Set;
|
||||
public class JsonToMapConverter implements ConditionalGenericConverter {
|
||||
@Override
|
||||
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
|
||||
return sourceType.getType() == String.class && Map.class.isAssignableFrom(targetType.getType());
|
||||
return sourceType.getType() == String.class && targetType.isMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user