diff -r 7b6c1bfeeb03 -r 6f0746b6de9f src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Tue Jul 12 14:52:08 2016 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Mon Jul 18 23:53:12 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -164,7 +164,9 @@ public final Content descfrmInterfaceLabel; - private final Writer writer; + private final DocFile file; + + private Writer writer; private Content script; @@ -180,7 +182,7 @@ */ public HtmlWriter(Configuration configuration, DocPath path) throws IOException, UnsupportedEncodingException { - writer = DocFile.createFileForOutput(configuration, path).openWriter(); + file = DocFile.createFileForOutput(configuration, path); this.configuration = configuration; this.memberDetailsListPrinted = false; profileTableHeader = new String[] { @@ -239,6 +241,7 @@ } public void write(Content c) throws IOException { + writer = file.openWriter(); c.write(writer, true); }