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
c9ffab14f5
commit
697861fef3
@ -180,12 +180,11 @@ 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");
|
||||
}
|
||||
|
||||
// 设置属性
|
||||
buildInfoModel.setReleaseMethod(releaseMethod1.getCode());
|
||||
buildInfoModel.setExtraData(jsonObject.toJSONString());
|
||||
|
||||
// 新增构建信息
|
||||
|
@ -77,6 +77,7 @@ public class RepositoryController extends BaseServerController {
|
||||
pageResult.forEach(repositoryModel -> {
|
||||
// 隐藏密码字段
|
||||
repositoryModel.setPassword(null);
|
||||
repositoryModel.setRsaPrv(null);
|
||||
});
|
||||
JSONObject jsonObject = JsonMessage.toJson(200, "获取成功", pageResult);
|
||||
jsonObject.put("total", pageResult.getTotal());
|
||||
|
@ -147,8 +147,8 @@ public class RepositoryModel extends BaseDbModel {
|
||||
Git(0, "Git"),
|
||||
Svn(1, "Svn"),
|
||||
;
|
||||
private int code;
|
||||
private String desc;
|
||||
private final int code;
|
||||
private final String desc;
|
||||
|
||||
RepoType(int code, String desc) {
|
||||
this.code = code;
|
||||
|
Loading…
Reference in New Issue
Block a user