Skip to content

WICKET-7186: correctly delegate calls to wicket cleaner#1485

Merged
bitstorm merged 1 commit into
apache:masterfrom
lalmeras:WICKET-7186
Jun 11, 2026
Merged

WICKET-7186: correctly delegate calls to wicket cleaner#1485
bitstorm merged 1 commit into
apache:masterfrom
lalmeras:WICKET-7186

Conversation

@lalmeras

@lalmeras lalmeras commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

@bitstorm bitstorm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @lalmeras ! You patch looks good. could you just modify the indentation style for consistency (i.e. put the opening braces on a new line )?

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.
@lalmeras

Copy link
Copy Markdown
Contributor Author

Thank you for your feedback.

I just amend my commit to fix the indentation style.

@bitstorm bitstorm merged commit 36b334d into apache:master 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants