Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1792

ServletPrintWriter.println uses LF instead of CRLF

XMLWordPrintable

      ServletPrintWriter.println() is using the LF(\n) as the line separator.

      io.undertow.servlet.spec.ServletPrintWriter
          public void println() {
              print('\n');
          }
      

      I think it is better to use the system property line.separator as well as the PrintWriter class which is extended class.

      https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html#println--
      public void println()
      Terminates the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').

            thofman Tomas Hofman
            thofman Tomas Hofman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: