From c8e3cca90f49827671dd17faedf69ca64d8c2462 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 3 May 2024 09:32:33 +0900 Subject: [PATCH] =?UTF-8?q?instanceof=20=EA=B4=80=EB=A0=A8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/base/crypto/Cryptography.java | 3 +-- src/main/java/cokr/xit/base/crypto/CryptographySupport.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/cokr/xit/base/crypto/Cryptography.java b/src/main/java/cokr/xit/base/crypto/Cryptography.java index 2325eaa..df4b529 100644 --- a/src/main/java/cokr/xit/base/crypto/Cryptography.java +++ b/src/main/java/cokr/xit/base/crypto/Cryptography.java @@ -297,8 +297,7 @@ public abstract class Cryptography extends AbstractComponent { Predicate 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; diff --git a/src/main/java/cokr/xit/base/crypto/CryptographySupport.java b/src/main/java/cokr/xit/base/crypto/CryptographySupport.java index 1c01fbb..7e5b4bd 100644 --- a/src/main/java/cokr/xit/base/crypto/CryptographySupport.java +++ b/src/main/java/cokr/xit/base/crypto/CryptographySupport.java @@ -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);