Commit 58e018373a78cee1a0c441f8613be4025460161c
1 parent
c1d9d4b9
Exists in
master
1.fix a bug about Field
Showing
2 changed files
with
2 additions
and
4 deletions
Show diff stats
build.gradle
src/main/java/com/taover/util/UtilHttpRequestMap.java
... | ... | @@ -7,9 +7,6 @@ import java.util.Iterator; |
7 | 7 | import java.util.List; |
8 | 8 | import java.util.Map; |
9 | 9 | |
10 | -import com.taover.util.UtilLog; | |
11 | -import com.taover.util.UtilString; | |
12 | - | |
13 | 10 | public class UtilHttpRequestMap { |
14 | 11 | /** |
15 | 12 | * 将requestMap上的String[]转换为String |
... | ... | @@ -78,6 +75,7 @@ public class UtilHttpRequestMap { |
78 | 75 | } |
79 | 76 | |
80 | 77 | Field keyField = beanClass.getDeclaredField(camelName); |
78 | + keyField.setAccessible(true); | |
81 | 79 | String keyFieldTypeName = keyField.getType().getSimpleName(); |
82 | 80 | if(keyValue == null){ |
83 | 81 | keyField.set(result, null); | ... | ... |