RFR: 8022213 Intermittent test failures in java/net/URLClassLoader (Add jdk/testlibrary/FileUtils.java)

Alan Bateman Alan.Bateman at oracle.com
Thu Nov 7 19:04:23 UTC 2013

On 07/11/2013 14:59, Chris Hegarty wrote:
> Given both Michael and Alan's comments. I've update the webrev:
>   http://cr.openjdk.java.net/~chegar/fileUtils.01/webrev/
> 1) more descriptive method names
> 2) deleteXXX methods return if interrupted, leaving the
>    interrupt status set
> 3) Use Files.copy with REPLACE_EXISTING
> 4) Use SimpleFileVisitor, rather than FileVisitor
This looks better although interrupting the sleep means that the 
deleteXXX will quietly terminate with the interrupt status set (which 
could be awkward to diagnose if used with tests that are also using 
Thread.interrupt). An alternative might be to just throw the IOException 
with InterruptedException as the cause.


More information about the core-libs-dev mailing list