Commit 7dba90b4 authored by yanzg's avatar yanzg

将源码打包进jar包

parent 077f7ff2
...@@ -395,7 +395,7 @@ public class StringHelper { ...@@ -395,7 +395,7 @@ public class StringHelper {
* @return 返回获取的值 * @return 返回获取的值
*/ */
public static <T> T to(Class<T> fromCls, Object from) { public static <T> T to(Class<T> fromCls, Object from) {
Object to = null; Object to;
if (isType(fromCls, String.class)) { if (isType(fromCls, String.class)) {
to = toString(from); to = toString(from);
} else if (isBaseType(TYPE_BOOL, Boolean.class, fromCls, from)) { } else if (isBaseType(TYPE_BOOL, Boolean.class, fromCls, from)) {
...@@ -415,7 +415,11 @@ public class StringHelper { ...@@ -415,7 +415,11 @@ public class StringHelper {
String strValue = toString(from); String strValue = toString(from);
if (strValue != null) { if (strValue != null) {
to = EnumHelper.toEnum(fromCls, strValue); to = EnumHelper.toEnum(fromCls, strValue);
} else {
to = null;
} }
} else {
to = null;
} }
if (to == null && from == null) { if (to == null && from == null) {
return null; return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment