On Thu, 29 May 2025 18:54:17 GMT, Phil Race <p...@openjdk.org> wrote:
> BTW there's a good reason for the newline. It's there on all platforms and > has been there since at least 1.5\ > If its not there then when you do "System.out.println(new > HeadlessException("foo").getMessage());\ > and there's a default message, you'll get\ > ``` > fooNo X11 Display variable was set ... > ``` > > instead of the current more legible > ``` > foo > No X11 Display variable was set ... > ``` @prrace This hasn't changed: the new line character at the start of the default headless message is preserved as it has always been there. What I remove is the new line character in the end of the message which wasn't there until [JDK-8286447](https://bugs.openjdk.org/browse/JDK-8286447) and which isn't there for macOS or Windows. In other words, currently you get foo No X11 Display variable was set ... and you'll get the same after applying the proposed patch too. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25453#issuecomment-2920470181