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])); } }