mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
fixed NPE in EnumWrapper.java, close #I7CWTE
This commit is contained in:
parent
6f30da2821
commit
8db7d20a72
@ -83,14 +83,17 @@ public class EnumWrapper<E extends Enum<E>> {
|
||||
|
||||
|
||||
public E getEnum(Object value) {
|
||||
for (E e : enums) {
|
||||
if (value.equals(getEnumValue(e))) {
|
||||
return e;
|
||||
if (value != null) {
|
||||
for (E e : enums) {
|
||||
if (value.equals(getEnumValue(e))) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasEnumValueAnnotation() {
|
||||
return hasEnumValueAnnotation;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user