Review request : 7031166 : pack200 CommandLineTest test failure - simple review

Alan Bateman Alan.Bateman at oracle.com
Fri Mar 25 18:37:10 UTC 2011


Kumar Srinivasan wrote:
> Hi,
>
> Replaces some old nio code which copies over the test sdk to run tests 
> against.
> http://cr.openjdk.java.net/~ksrini/7031166/webrev.0/
>
> Thanks
> Kumar
I see the original code creates the parent directories if they don't 
exist so if you want it work the same way then you could change it to:

Path parent = dst.toPath().getParent();
if (parent != null)
    Files.createDirectories(parent);
Files.copy(....);

I see that CommandLineTests.runPack200 gets the absolute path before 
calling this function. You shouldn't need to do that now. I also see it 
tests if the target file exists and deletes it before the copy. You can 
skip that too if you add the REPLACE_EXISTING option to the copy. One 
other suggestion is to do a static import of StandardCopyOption to avoid 
the copy going into a second line.

-Alan.



More information about the core-libs-dev mailing list