From 22fac34b823d5a8b2d550553074f2f6af34df887 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: Thu, 15 Sep 2022 08:26:17 +0800
Subject: [PATCH] !248 【轻量级 PR】:优化注释 Merge pull request !248 from CHY/dev

---
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java |   35 ++++++++++++++++-------------------
 1 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java
index aa7c436..185ebe5 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java
@@ -313,7 +313,7 @@
      * 转换为Integer数组<br>
      * 
      * @param split 分隔符
-     * @param split 被转换的值
+     * @param str 被转换的值
      * @return 结果
      */
     public static Integer[] toIntArray(String split, String str)
@@ -370,7 +370,7 @@
      * 转换为String数组<br>
      * 
      * @param split 分隔符
-     * @param split 被转换的值
+     * @param str 被转换的值
      * @return 结果
      */
     public static String[] toStrArray(String split, String str)
@@ -561,17 +561,12 @@
         switch (valueStr)
         {
             case "true":
-                return true;
-            case "false":
-                return false;
             case "yes":
-                return true;
             case "ok":
-                return true;
-            case "no":
-                return false;
             case "1":
                 return true;
+            case "false":
+            case "no":
             case "0":
                 return false;
             default:
@@ -797,16 +792,20 @@
         }
         else if (obj instanceof byte[] || obj instanceof Byte[])
         {
-            if (obj instanceof byte[]){
+            if (obj instanceof byte[])
+            {
                 return str((byte[]) obj, charset);
-            } else {
-                Byte[] bytes = (Byte[])obj;
+            }
+            else
+            {
+                Byte[] bytes = (Byte[]) obj;
                 int length = bytes.length;
                 byte[] dest = new byte[length];
-                for (int i = 0; i < length; i++) {
+                for (int i = 0; i < length; i++)
+                {
                     dest[i] = bytes[i];
                 }
-            return str (dest,charset);
+                return str(dest, charset);
             }
         }
         else if (obj instanceof ByteBuffer)
@@ -903,7 +902,7 @@
      */
     public static String toSBC(String input, Set<Character> notConvertSet)
     {
-        char c[] = input.toCharArray();
+        char[] c = input.toCharArray();
         for (int i = 0; i < c.length; i++)
         {
             if (null != notConvertSet && notConvertSet.contains(c[i]))
@@ -945,7 +944,7 @@
      */
     public static String toDBC(String text, Set<Character> notConvertSet)
     {
-        char c[] = text.toCharArray();
+        char[] c = text.toCharArray();
         for (int i = 0; i < c.length; i++)
         {
             if (null != notConvertSet && notConvertSet.contains(c[i]))
@@ -963,9 +962,7 @@
                 c[i] = (char) (c[i] - 65248);
             }
         }
-        String returnString = new String(c);
-
-        return returnString;
+        return new String(c);
     }
 
     /**

--
Gitblit v1.9.3