You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2019/10/12 14:11:00 UTC

[jira] [Resolved] (NETBEANS-2099) System.out.flush() doesn't flush all data to output window

     [ https://issues.apache.org/jira/browse/NETBEANS-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Laszlo Kishalmi resolved NETBEANS-2099.
---------------------------------------
    Resolution: Cannot Reproduce

Tested in 11.2-beta2 with the built in Maven and Maven 3.5. I cannot reproduce it.
Though you need to realize that the system output in this case goes through Maven first then through the IDE. Also the flush is really OS dependent. Some OS is happily end the process before its output buffer is actually flushed.

> System.out.flush() doesn't flush all data to output window
> ----------------------------------------------------------
>
>                 Key: NETBEANS-2099
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2099
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: platform - Output Window
>    Affects Versions: 9.0, 10.0
>         Environment: Product Version: Apache NetBeans IDE 10.0 (Build incubator-netbeans-release-380-on-20181217)
> Java: 11.0.1; OpenJDK 64-Bit Server VM 11.0.1+13
> Runtime: OpenJDK Runtime Environment 11.0.1+13
> System: Windows 8.1 version 6.3 running on amd64; Cp1252; en_US (nb)
>            Reporter: Stephan van Hulst
>            Assignee: Laszlo Kishalmi
>            Priority: Minor
>
> Consider the following application:
> {code:java}
> public static void main(String... args) {
>     System.out.print("Hello\nWorld!");
>     System.out.flush();
> }{code}
> After executing the first statement, the following line is printed to the output window:
> {code}
> Hello
> {code}
> After executing the second statement, I expect the remainder of the printed string to appear in the output window:
> {code}
> Hello
> World!
> {code}
> The flush does not appear to have any effect, however.
> When executing this program from the Windows command line, it works as expected.
> Since the documentation of {{OutputStream.flush()}} mentions that the behavior of flush is operating system dependent, this is not really a bug, but it would be really nice if it flushed to the output window the same way it flushes to the command line window.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists