Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ public synchronized void close() {
}
if (jar != null) {
jar.delete();
jar.deleteOnExit();
Comment thread
THausherr marked this conversation as resolved.
Outdated

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File#deleteOnExit() can throw SecurityException. Since close() currently doesn’t declare/expect to throw and is used in failure-cleanup paths, this new call can cause unexpected runtime failure during cleanup. Please guard the deleteOnExit() call (and any conditional logic around it) to keep close() best-effort.

Suggested change
jar.deleteOnExit();
try {
jar.deleteOnExit();
} catch (SecurityException ignore) {
// best-effort cleanup; ignore inability to register deleteOnExit
}

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be a SecurityException because it's our own file.

}
}

Expand Down
Loading