On Tue, 12 Sep 2023 19:59:57 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

> A few classes in `jdk.internal.util.xml.impl` package have non-final fields 
> which could easily be marked `final`.
> 
> Also fixed a few typos and incorrect javadoc links.

src/java.base/share/classes/jdk/internal/util/xml/impl/XMLStreamWriterImpl.java 
line 78:

> 76:     private boolean _doIndent = true;
> 77:     //The system line separator for writing out line breaks.
> 78:     private final char[] _lineSep = System.lineSeparator().toCharArray();

The method System.lineSeparator() is specified such that it will always return 
the same value. Hene, I proposes:


    @Stable
    private static final char[] LINE_SEP = System.lineSeparator().toCharArray();

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15691#discussion_r1399231282

Reply via email to