| 
					
				 | 
			
			
				@@ -138,7 +138,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 十六进制字符串 (小写) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static String toHex(byte[] bytes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (bytes == null) return ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (bytes == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StringBuilder sb = new StringBuilder(bytes.length * 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (byte b : bytes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sb.append(String.format("%02x", b)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -205,7 +207,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Byte值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Byte toByte(Object value, Byte defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Number) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ((Number) value).byteValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -255,7 +259,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Integer值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Integer toInt(Object value, Integer defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Number) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ((Number) value).intValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -284,7 +290,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Long值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Long toLong(Object value, Long defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Number) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ((Number) value).longValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -313,7 +321,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Short值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Short toShort(Object value, Short defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Number) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ((Number) value).shortValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -342,7 +352,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Float值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Float toFloat(Object value, Float defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Number) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ((Number) value).floatValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -371,7 +383,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Double值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Double toDouble(Object value, Double defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Number) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ((Number) value).doubleValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -406,7 +420,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Boolean值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Boolean toBoolean(Object value, Boolean defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Boolean) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (Boolean) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -415,10 +431,18 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof String) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String strVal = ((String) value).trim().toLowerCase(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if ("true".equals(strVal)) return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if ("false".equals(strVal)) return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if ("1".equals(strVal)) return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if ("0".equals(strVal)) return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ("true".equals(strVal)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ("false".equals(strVal)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ("1".equals(strVal)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ("0".equals(strVal)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return Boolean.parseBoolean(value.toString()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -445,7 +469,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的Character值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static Character toCharacter(Object value, Character defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof Character) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (Character) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -479,7 +505,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的BigDecimal值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof BigDecimal) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (BigDecimal) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -514,7 +542,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的BigInteger值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static BigInteger toBigInteger(Object value, BigInteger defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof BigInteger) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (BigInteger) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -551,7 +581,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的String值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static String toStr(Object value, String defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof String) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (String) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -779,7 +811,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的枚举值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static <E extends Enum<E>> E toEnum(Class<E> enumClass, Object value, E defaultValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return defaultValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 尝试通过名称匹配 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof String) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -935,7 +969,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return Unicode编码字符串 (格式: \u4e2d\u6587) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static String strToUnicode(String str) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (str == null) return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (str == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StringBuilder sb = new StringBuilder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (char c : str.toCharArray()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sb.append("\\u").append(String.format("%04x", (int) c)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -950,11 +986,15 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 解码后的字符串 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static String unicodeToStr(String unicode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (unicode == null) return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (unicode == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StringBuilder sb = new StringBuilder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String[] hex = unicode.split("\\\\u"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (int i = 1; i < hex.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (hex[i].isEmpty()) continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (hex[i].isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 int data = Integer.parseInt(hex[i].substring(0, 4), 16); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sb.append((char) data); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -982,7 +1022,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的int数组 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static int[] toIntArray(Object value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return new int[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new int[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof int[]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (int[]) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1017,7 +1059,9 @@ public class ConvertUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 转换后的String数组 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static String[] toStrArray(Object value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (value == null) return new String[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (value == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new String[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (value instanceof String[]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return (String[]) value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |