github-code-scanning[bot] commented on code in PR #12051:
URL: https://github.com/apache/dolphinscheduler/pull/12051#discussion_r979424866
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java:
##########
@@ -329,37 +371,37 @@
public boolean checkSubProcessDefinitionValid(ProcessDefinition
processDefinition) {
// query all subprocesses under the current process
List<ProcessTaskRelation> processTaskRelations =
-
processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode());
+
processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode());
if (processTaskRelations.isEmpty()) {
return true;
}
Set<Long> relationCodes =
-
processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet());
+
processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet());
List<TaskDefinition> taskDefinitions =
taskDefinitionMapper.queryByCodeList(relationCodes);
// find out the process definition code
Set<Long> processDefinitionCodeSet = new HashSet<>();
taskDefinitions.stream()
- .filter(task ->
TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach(
- taskDefinition ->
processDefinitionCodeSet.add(Long.valueOf(
-
JSONUtils.getNodeString(taskDefinition.getTaskParams(),
-
Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));
+ .filter(task ->
TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach(
+ taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(
+ JSONUtils.getNodeString(taskDefinition.getTaskParams(),
+ Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/1542)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]