You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/08/17 03:35:50 UTC
[GitHub] [dolphinscheduler] SbloodyS commented on a diff in pull request #11519: [Improvement] File deletion logic optimization
SbloodyS commented on code in PR #11519:
URL: https://github.com/apache/dolphinscheduler/pull/11519#discussion_r947420600
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java:
##########
@@ -828,8 +828,16 @@ public Result<Object> delete(User loginUser, int resourceId) throws IOException
Set<Integer> resourceIdSet = resourceProcessMap.keySet();
// get all children of the resource
List<Integer> allChildren = listAllChildren(resource, true);
+
Integer[] needDeleteResourceIdArray = allChildren.toArray(new Integer[allChildren.size()]);
+
+ if (needDeleteResourceIdArray.length>=2){
Review Comment:
```suggestion
if (needDeleteResourceIdArray.length >= 2){
```
--
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