After a recent git pull I observed the following build failure:

Exception in thread "main" java.nio.file.FileAlreadyExistsException: 
...\jdk\build\windows-x64\buildtools\gensrc\java.base.interim\jdk\internal\javac\PreviewFeature.java
        at java.base/sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:123)
        at 
java.base/sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:279)
        at java.base/java.nio.file.Files.copy(Files.java:1196)
        at previewfeature.SetupPreviewFeature.main(SetupPreviewFeature.java:79)

`Files.copy` refuses to replace an existing file unless the 
`StandardCopyOption.REPLACE_EXISTING` is passed. This PR adds that option.

-------------

Commit messages:
 - Replace existing PreviewFeature file

Changes: https://git.openjdk.org/jdk/pull/30597/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30597&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8381722
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/30597.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30597/head:pull/30597

PR: https://git.openjdk.org/jdk/pull/30597

Reply via email to