From 772df51023d98b718267c21cbda206e6744bbf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Tue, 9 Apr 2024 14:55:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=AD=A3=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cs-base/src/main/java/com/cf/cs/base/misc/MessageUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cs-base/src/main/java/com/cf/cs/base/misc/MessageUtil.java b/cs-base/src/main/java/com/cf/cs/base/misc/MessageUtil.java index fc08c9c..f7d4ee1 100644 --- a/cs-base/src/main/java/com/cf/cs/base/misc/MessageUtil.java +++ b/cs-base/src/main/java/com/cf/cs/base/misc/MessageUtil.java @@ -11,7 +11,7 @@ import java.util.Locale; * @author xajhuang @163.com */ public class MessageUtil { - private final static int arraySize = 2; + private static final int ARRAY_SIZE = 2; private MessageUtil() { throw new AssertionError("Instantiating utility class."); @@ -27,7 +27,7 @@ public class MessageUtil { public static String get(String key, String language) { if (!StringUtils.isEmpty(language)) { String[] arrs = language.split("_"); - if (arrs.length == arraySize) { + if (arrs.length == ARRAY_SIZE) { return get(key, new Locale(arrs[0], arrs[1])); } } @@ -46,7 +46,7 @@ public class MessageUtil { public static String get(String key, Object[] params, String language) { if (!StringUtils.isEmpty(language)) { String[] arrs = language.split("_"); - if (arrs.length == arraySize) { + if (arrs.length == ARRAY_SIZE) { return get(key, params, new Locale(arrs[0], arrs[1])); } }