Copilot commented on code in PR #1445:
URL: https://github.com/apache/struts/pull/1445#discussion_r2586208825
##########
core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java:
##########
@@ -76,10 +76,16 @@ public void cleanUp() {
LOG.debug("Performing File Upload temporary storage cleanup.");
for (List<FileInfo> fileInfoList : fileInfos.values()) {
for (FileInfo fileInfo : fileInfoList) {
- File file = fileInfo.getFile();
- LOG.debug("Deleting file '{}'.", file.getName());
- if (!file.delete()) {
- LOG.warn("There was a problem attempting to delete file
[{}].", file.getName());
+ try {
+ // catch any exceptions during cleanup to ensure all files
are
Review Comment:
The comment is incomplete. It should read something like "catch any
exceptions during cleanup to ensure all files are attempted" or similar to
complete the thought.
```suggestion
// catch any exceptions during cleanup to ensure all
files are attempted for deletion
```
--
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]