Skip to content

Commit

Permalink
server: avoid NPE when body of POST WS is null, #TASK-4073
Browse files Browse the repository at this point in the history
  • Loading branch information
pfurio committed Sep 19, 2024
1 parent 87cc4a6 commit 0e5515c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,12 @@ public Response submitOperationToProject(String toolId, String project, ToolPara
public Response submitOperation(String toolId, String project, String study, ToolParams params, String jobName, String jobDescription,
String jobDependsOn, String jobTags, String jobScheduledStartTime, String jobPriority, Boolean dryRun) {
try {
Map<String, Object> paramsMap = params.toParams();
Map<String, Object> paramsMap;
if (params != null) {
paramsMap = params.toParams();
} else {
paramsMap = new HashMap<>();
}
if (StringUtils.isNotEmpty(study)) {
paramsMap.put(ParamConstants.STUDY_PARAM, study);
}
Expand Down

0 comments on commit 0e5515c

Please sign in to comment.