You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The staged file is deleted as soon as the JCR node is created, but saveActivityNewVersion continues with contacts, budgets, structures, a Hibernate merge/flush, and audit work afterward. If any later step fails and the activity save is retried, the pending resource still references this upload ID but its file has already been removed, so the retry cannot succeed. Defer cleanup until the complete activity save commits, or retain/re-stage the file on failure.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
The staged file is deleted as soon as the JCR node is created, but the activity's Hibernate transaction is committed later by ActivityUtil.saveActivity/endConversation and can still fail. A failed save therefore leaves the pending stagedUploadId with no backing file, so the user cannot retry the save; defer cleanup until the activity commit succeeds.
deleteOnExit() registers a JVM shutdown hook for every upload, while this feature already deletes the file in finally or through the staged-store TTL/session cleanup. On a long-running Tomcat process, repeated uploads accumulate exit-hook entries and their path strings, causing avoidable memory growth; rely on the existing explicit cleanup instead.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
getContentLengthLong() is allowed to return -1 for a valid chunked/unknown-length multipart request. Rejecting that value means imports fail with 413 when the client or reverse proxy uses chunked transfer, even when the workbook is within the limit. Enforce the limit while consuming the stream (for example with a bounded/counting stream) and only reject a known length when it exceeds the limit.
deleteOnExit() registers every staged path in the JVM-wide DeleteOnExitHook set, and entries are never removed even when the TTL/session cleanup deletes the file. Repeated uploads can therefore grow this in-memory set without bound; use the store's bounded cleanup/periodic temp-directory cleanup instead of registering each upload with deleteOnExit.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
The staged file is deleted immediately after the JCR call, before saveActivityNewVersion finishes its later flush and persistence work. If a later resource, structure, or activity save fails, the pending TemporaryActivityDocument still points at this upload ID but the file has already been removed, so the user cannot retry the save without re-uploading (and the JCR node may be orphaned). Defer cleanup until the complete activity save succeeds, or restore/retain the staged upload on failure.
deleteOnExit() registers every staged path in the JVM shutdown-hook registry, and deleting the file later does not remove that registry entry. Since this endpoint can handle many uploads, the registry grows for the lifetime of the server and retains every pathname; rely on the store's TTL/cleanup (and a bounded startup/temp-directory cleanup strategy) instead of registering each upload with deleteOnExit().
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
pendingUploadData is retained while the user chooses a file, but rejected-file branches do not clear it. If a valid file is selected and then an invalid or oversized file is chosen before clicking this button, the next click still submits the earlier file. Clear the pending upload and reset its UI state whenever a selection is rejected.
deleteOnExit() registers every staged upload in the JVM-wide shutdown hook, while the store already deletes these files on replacement, expiry, session cleanup, and save. On a long-running server this registration set grows for every upload and retains paths until JVM shutdown, creating avoidable memory growth; remove this call and rely on the store's explicit cleanup (with a separate startup/orphan cleanup strategy if crash recovery is required).
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
The staged file is deleted immediately after its JCR node is created, but insertResources runs before the rest of saveActivityNewVersion (saveEditors, contacts, structures, and the final Hibernate flush). If any later step fails, the activity is not committed yet but the user can no longer retry with the staged document because its source file has already been removed. Defer cleanup until the whole activity save succeeds, or retain a rollback/retryable copy.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Remove deleteOnExit call for staged file as cleanup is handled by StagedResourceUploadStore.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.