WICKET-7186: correctly delegate calls to wicket cleaner#1485
Merged
Conversation
FileCleaningTrackerAdapter does not delegate some calls to IFileCleaner. These call are then performed by FileCleaningTracker superclass. Each FileCleaningTrackerAdapter then create a Reaper thread that is leaked (FileCleaningTrackerAdapter is request-scope). Intended behavior is to delegate to IFileCleaner that is a singleton (there is at most 1 Reaper by wicket application). The issue appears on wicket 10.9.x as commons-fileupload2-M5 refactors DiskFileItem and now calls the Path variant of track(...) method. This fix adds the missing delegate methods.
Contributor
Author
|
Thank you for your feedback. I just amend my commit to fix the indentation style. |
bitstorm
approved these changes
Jun 11, 2026
bitstorm
pushed a commit
that referenced
this pull request
Jun 11, 2026
FileCleaningTrackerAdapter does not delegate some calls to IFileCleaner. These call are then performed by FileCleaningTracker superclass. Each FileCleaningTrackerAdapter then create a Reaper thread that is leaked (FileCleaningTrackerAdapter is request-scope). Intended behavior is to delegate to IFileCleaner that is a singleton (there is at most 1 Reaper by wicket application). The issue appears on wicket 10.9.x as commons-fileupload2-M5 refactors DiskFileItem and now calls the Path variant of track(...) method. This fix adds the missing delegate methods.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
FileCleaningTrackerAdapter does not delegate some calls to IFileCleaner.
These call are then performed by FileCleaningTracker superclass. Each FileCleaningTrackerAdapter then create a Reaper thread that is leaked (FileCleaningTrackerAdapter is request-scope).
Intended behavior is to delegate to IFileCleaner that is a singleton (there is at most 1 Reaper by wicket application).
The issue appears on wicket 10.9.x as commons-fileupload2-M5 refactors DiskFileItem and now calls the Path variant of track(...) method.
This fix adds the missing delegate methods.
I successfully tested this fix on wicket-10.x branch with one of our application and a breakpoint on
FileCleaningTracker$Reaper. Before fix, one Reaper is created for each file upload. After fix, Reaper is created only on the first call.https://issues.apache.org/jira/browse/WICKET-7186