Skip to content

Commit

Permalink
add Boolean type to default value of enum type
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Mar 28, 2024
1 parent eb73caa commit e441984
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tis-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ spec:
mountPath: /opt/app/tis-uber/tis-assemble/conf/tis-web-config/
- name: tis-console-pvc
mountPath: "/opt/data"
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0.5
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0.6
# command: [ "/bin/sh", "-c", "sleep 1000000" ]
ports:
- name: tis-8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

package com.qlangtech.tis.extension.impl;

import com.qlangtech.tis.manage.common.Option;

import java.lang.reflect.Field;
import java.util.List;
import java.util.function.BiFunction;
Expand All @@ -41,9 +39,9 @@ public enum EnumFieldMode {
// 如果是List类型,则只需要将list的第一个option的值赋值给它就行
dftVal = getFirstVal(dftVal);
}
if (dftVal != null && !(dftVal instanceof String)) {
if (dftVal != null && !(dftVal instanceof String || dftVal instanceof Boolean)) {
throw new IllegalStateException(fieldDesc + " ,default " + "val:" + dftVal + " " + " must" + " be " +
"type of String ,but now is " + dftVal.getClass());
"type of String or Boolean ,but now is " + dftVal.getClass());
}
return dftVal;
});
Expand Down

0 comments on commit e441984

Please sign in to comment.