cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: Minor fix for asciidoc build
Date Fri, 02 Feb 2018 15:03:53 GMT
Repository: cayenne
Updated Branches:
  refs/heads/STABLE-4.0 4ca402cd0 -> 0b8774d91


Minor fix for asciidoc build


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/0b8774d9
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/0b8774d9
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/0b8774d9

Branch: refs/heads/STABLE-4.0
Commit: 0b8774d91b19881df44e4187ebd8cb2323a6248e
Parents: 4ca402c
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Fri Feb 2 18:03:47 2018 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Fri Feb 2 18:03:47 2018 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/asciidoc/CayennePostProcessor.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/0b8774d9/docs/asciidoc/cayenne-asciidoc-extension/src/main/java/org/apache/cayenne/asciidoc/CayennePostProcessor.java
----------------------------------------------------------------------
diff --git a/docs/asciidoc/cayenne-asciidoc-extension/src/main/java/org/apache/cayenne/asciidoc/CayennePostProcessor.java
b/docs/asciidoc/cayenne-asciidoc-extension/src/main/java/org/apache/cayenne/asciidoc/CayennePostProcessor.java
index 1469e0e..6a4e1d9 100644
--- a/docs/asciidoc/cayenne-asciidoc-extension/src/main/java/org/apache/cayenne/asciidoc/CayennePostProcessor.java
+++ b/docs/asciidoc/cayenne-asciidoc-extension/src/main/java/org/apache/cayenne/asciidoc/CayennePostProcessor.java
@@ -127,7 +127,12 @@ public class CayennePostProcessor extends Postprocessor {
         Object docname = ((Map)document.getOptions().get(Options.ATTRIBUTES)).get("docname");
 
         Path path = FileSystems.getDefault().getPath((String) destDir, docname + ".toc.html");
-        try(BufferedWriter br = newBufferedWriter(path, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE))
{
+        StandardOpenOption[] options = {
+                StandardOpenOption.TRUNCATE_EXISTING,
+                StandardOpenOption.CREATE,
+                StandardOpenOption.WRITE
+        };
+        try(BufferedWriter br = newBufferedWriter(path, options)) {
             br.write(toc, 0, toc.length());
             br.flush();
         } catch (IOException ex) {


Mime
View raw message