This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270729 - Carriage return (\r, 0x0D) in output window moves output to new line (unnecessary Maven download progress lines in log)
Summary: Carriage return (\r, 0x0D) in output window moves output to new line (unneces...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: Dev
Hardware: PC Windows 10 x64
: P3 normal with 1 vote (vote)
Assignee: Jaroslav Havlin
Depends on:
Reported: 2017-05-24 10:26 UTC by bugmenot1
Modified: 2017-05-24 10:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description bugmenot1 2017-05-24 10:26:08 UTC
After \r (without \n), output should overwrite the output in the last line, but it has the same effect as \n.

Test case:

public class MainApp {
    public static void main(String[] args) throws InterruptedException {
        while (true) {
            System.out.print("\r"); // no \n, no println

and so on

Expected output: A single line which is updated every second

Building Maven projects is also affected. Without --batch-mode, the output window contains many lines like
Progress (1): 4.1/34 kB
Progress (1): 7.9/34 kB
Progress (1): 12/34 kB
Progress (1): 16/34 kB
Progress (1): 20/34 kB
Progress (1): 24/34 kB
Progress (1): 28/34 kB
Progress (1): 32/34 kB
Progress (1): 33/34 kB
Progress (1): 34 kB
which should disappear because they also use \r.

Similar bugs: bug 130857, bug 206505, bug 217328, bug 239126

Product Version: NetBeans IDE Dev (Build 201705230001)
Java: 1.8.0_121; Java HotSpot(TM) 64-Bit Server VM 25.121-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_121-b13
System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)