Skip to content

Commit

Permalink
perf[storage]: simplified method
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Jul 19, 2024
1 parent 45483cc commit 1f7b76d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
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
Expand Down

0 comments on commit 1f7b76d

Please sign in to comment.