You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org> on 2025/08/21 06:27:14 UTC
Re: [PR] [Fix-17436][Workflow]Task timeout kill throw exception [dolphinscheduler]
github-advanced-security[bot] commented on code in PR #17437:
URL: https://github.com/apache/dolphinscheduler/pull/17437#discussion_r2289979621
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ProcessUtils.java:
##########
@@ -115,13 +115,14 @@
// Get all child processes
String pids = getPidsStr(processId);
String[] pidArray = PID_PATTERN.split(pids);
- if (pidArray.length == 0) {
+ if (StringUtils.isBlank(pids) || pidArray.length == 0) {
log.warn("No valid PIDs found for process: {}", processId);
return true;
}
// Convert PID string to list of integers
- List<Integer> pidList = Arrays.stream(pidArray).map(Integer::parseInt).collect(Collectors.toList());
+ List<Integer> pidList = Arrays.stream(pidArray).filter(StringUtils::isNotBlank).map(Integer::parseInt)
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/5522)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org