Michael Hall wrote:
On Dec 1, 2017, at 7:43 PM, victor.droz...@oracle.com
<mailto:victor.droz...@oracle.com> wrote:
Kevin,
Please review the changes about copying classpath entries on Mac and
Windows.
JIRA: https://bugs.openjdk.java.net/browse/JDK-8179033
Webrev: http://cr.openjdk.java.net/~vdrozdov/JDK-8179033/webrev.00/
<http://cr.openjdk.java.net/%7Evdrozdov/JDK-8179033/webrev.00/>
Sorry, to comment on this when it is not my place.
But I had looked at this sometime ago and it made no sense.
For the Mac you have…
- Files.copy(new File(srcdir, fname).toPath(), new
File(javaDirectory.toFile(), fname).toPath());
+ writeEntry(new FileInputStream(new File(srcdir, fname)),
+ new File(javaDirectory.toFile(),
fname).toPath());
What is the difference here? You are just changing the method of
writing the file. Otherwise locations are identical.
Assuming the first way isn’t working, why would the second way do better?
writeEntry creates the directory before copying (and also opens the file
using an InputStream, but its the former that is the main part of the fix).
-- Kevin