instanceof 관련 수정

master
mjkhan21 7 months ago
parent d0f296f481
commit c8e3cca90f

@ -297,8 +297,7 @@ public abstract class Cryptography extends AbstractComponent {
Predicate<TargetValue> filter = valueType -> {
if (obj == null)
return false;
if (obj instanceof Map) {
Map<?, ?> map = (Map<?, ?>)obj;
if (obj instanceof Map<?, ?> map) {
for (String key: valueType.getMapKeys()) {
if (map.containsKey(key))
return true;

@ -52,8 +52,7 @@ public class CryptographySupport extends MybatisPlugin {
protected Object handle(ResultSetHandler resultSetHandler, Statement statement) throws SQLException {
Object obj = super.handle(resultSetHandler, statement);
if (obj instanceof List) {
List<?> list = (List<?>)obj;
if (obj instanceof List<?> list) {
list.forEach(this::decrypt);
} else {
decrypt(obj);

Loading…
Cancel
Save