mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-04 12:58:24 +08:00
fix npe
This commit is contained in:
parent
697861fef3
commit
28895f3b6c
@ -157,6 +157,7 @@ public class BuildInfoController extends BaseServerController {
|
||||
// 发布方式
|
||||
BuildReleaseMethod releaseMethod1 = BaseEnum.getEnum(BuildReleaseMethod.class, releaseMethod);
|
||||
Assert.notNull(releaseMethod1, "发布方法不正确");
|
||||
buildInfoModel.setReleaseMethod(releaseMethod1.getCode());
|
||||
// 把 extraData 信息转换成 JSON 字符串
|
||||
JSONObject jsonObject = JSON.parseObject(extraData);
|
||||
|
||||
@ -180,8 +181,6 @@ public class BuildInfoController extends BaseServerController {
|
||||
}
|
||||
// 检查关联数据ID
|
||||
buildInfoModel.setReleaseMethodDataId(jsonObject.getString("releaseMethodDataId"));
|
||||
// 设置属性
|
||||
buildInfoModel.setReleaseMethod(releaseMethod1.getCode());
|
||||
if (buildInfoModel.getReleaseMethod() != BuildReleaseMethod.No.getCode()) {
|
||||
Assert.hasText(buildInfoModel.getReleaseMethodDataId(), "没有发布分发对应关联数据ID");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user