Affects Version/s: None
Fix Version/s: 1.1
FileRestoreStore.java uses mkdirs() as follows:
Now mkdirs() returns true only if the method actually created the directories; it's theoretically possible for the directory to be created in the window between the exists() and mkdirs() invocations.
Also, the initial exists() call is redundant, because that's what mkdirs() does anyway (in the RI implementation, at least).
I suggest the following instead:
If mkdirs() returns false, the code then checks to see if the directory exists, so the throws clause will only be invoked if the parent really cannot be created.
The same code also appears in AbstractTestCase and FilesystemAlterationMonitorTestCase.
|Fix Version/s||1.1 [ 12312668 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|