eloy arce created WICKET-6236:
---------------------------------
Summary: Files.remove() causes a 5 seconds delay instead of 500ms
as was intended
Key: WICKET-6236
URL: https://issues.apache.org/jira/browse/WICKET-6236
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.24.0, 6.23.0
Environment: Windows 7
Reporter: eloy arce
Priority: Minor
The method Files.remove(final java.io.File file) has a cycle for trying to
delete a file.
As Javadoc says, it was intended to re-try 50 times, with a delay of 100ms at
each 10th attemp (implemented with 2 cycles, one inside another), but acctually
it has a 100ms delay EACH time, because the sleep is inside the inner cycle.
This produces a delay of 5 secs for each file, and if you have about 10 files
it's a lot of time (about a minute).
In windows using a page that has a model with a list of FileUpload, it tries to
delete the files each time it recovers the Page from PageStore, and (I dont
know why) can't delete any of the files, resulting in the mentioned delay. (in
linux it works without problem)
Besides the problem with windows locking the files, If the cycle works as
intended (the sleep in the outer cycle), the problem will be smaller.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)