perf[storage]: simplified method

This commit is contained in:
godotg
2024-07-19 22:15:29 +08:00
parent 45483ccdaa
commit 1f7b76dbbb
2 changed files with 2 additions and 2 deletions
@@ -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