kwin commented on a change in pull request #142:
URL:
https://github.com/apache/jackrabbit-filevault/pull/142#discussion_r642275844
##########
File path:
vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/registry/impl/FSInstallState.java
##########
@@ -302,7 +302,7 @@ private static WorkspaceFilter readWorkspaceFilter(Element
child) throws Configu
*/
public void save(Path file) throws IOException {
Files.createDirectories(file.getParent());
- try (OutputStream out = Files.newOutputStream(file,
StandardOpenOption.CREATE)) {
+ try (OutputStream out = Files.newOutputStream(file,
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING)) {
Review comment:
I would rather rely on the standard options of
https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#newOutputStream(java.nio.file.Path,%20java.nio.file.OpenOption...)
> If no options are present then this method works as if the CREATE,
TRUNCATE_EXISTING, and WRITE options are present
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]