Skip to content

Commit 47573d4

Browse files
committed
fix(dict): 修复枚举遍历时空指针异常问题,添加空值校验
1 parent 5fbd797 commit 47573d4

File tree

1 file changed

+3
-0
lines changed
  • hsweb-core/src/main/java/org/hswebframework/web/dict

1 file changed

+3
-0
lines changed

hsweb-core/src/main/java/org/hswebframework/web/dict/EnumDict.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ static <T extends EnumDict<?>> long toMask(T... t) {
213213
}
214214
long value = 0L;
215215
for (T t1 : t) {
216+
if(t1 == null){
217+
continue;
218+
}
216219
value |= t1.getMask();
217220
}
218221
return value;

0 commit comments

Comments
 (0)