[
https://issues.apache.org/jira/browse/WICKET-6236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pedro Santos reassigned WICKET-6236:
------------------------------------
Assignee: Pedro Santos
> 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.23.0, 6.24.0
> Environment: Windows 7
> Reporter: eloy arce
> Assignee: Pedro Santos
> Priority: Minor
> Labels: delay, delete, files, sleep
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> 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)