Skip to content

Commit

Permalink
#654 fix it: NullPointException
Browse files Browse the repository at this point in the history
  • Loading branch information
heziai committed Dec 26, 2019
1 parent bd9101f commit b4a806b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public SuccessResponseEntity updateJobConfig(final HttpServletRequest request,
@AuditParam("jobName") @PathVariable String jobName, UpdateJobConfigVo updateJobConfigVo)
throws SaturnJobConsoleException {
assertIsPermitted(PermissionKeys.jobUpdate, namespace);
if(updateJobConfigVo.getGroups().length() >= 255) {
throw new SaturnJobConsoleException("分组总数不能超过15个");
String groups = updateJobConfigVo.getGroups();
if (groups != null && groups.length() > 255) {
throw new SaturnJobConsoleException("分组过长,不能超过255个字符");
}
jobService.updateJobConfig(namespace, updateJobConfigVo.toJobConfig(), getCurrentLoginUserName());
return new SuccessResponseEntity();
Expand Down

0 comments on commit b4a806b

Please sign in to comment.