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 252514 - Maven project's output window doesn't show line consisting of number + "B"
Summary: Maven project's output window doesn't show line consisting of number + "B"
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-21 03:06 UTC by jeffreymorlan
Modified: 2015-06-18 02:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (96.07 KB, image/png)
2015-05-21 03:06 UTC, jeffreymorlan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeffreymorlan 2015-05-21 03:06:20 UTC
Created attachment 153773 [details]
Screenshot

If you run a Maven project, and it outputs a line consisting of a number followed by the letter "B", that line does not show up in the output window.

This appears to be due to the following code in org.netbeans.modules.maven.output.GlobalOutputProcessor:

/*test*/ static final Pattern DOWNLOAD = Pattern.compile("^(\\d+(/\\d*)? ?(M|K|b|KB|B|\\?)\\s*)+$"); //NOI18N
...
if (DOWNLOAD.matcher(line).matches()) {
    visitor.skipLine();
    return;
}

Clearly the idea is to avoid flooding the output window with maven's download progress output (which would take up many lines as the output window doesn't implement carriage returns), but it's not hard to write a program that outputs a matching line by accident. (I discovered this behavior when I wrote a program to list all the Unicode whitespace characters, and spent way too long trying to figure out why "000B" wasn't listed)

Assuming that handling carriage returns differently from line feeds isn't feasible, one way to make this filter less likely to hide legitimate program output might be to count the number of "Downloading: " lines minus the number of "Downloaded: " lines seen so far, and only hide lines when that number is positive.
Comment 1 Tomas Stupka 2015-06-16 16:22:14 UTC
fixed in jet-main #bb8209f71483
Comment 2 Quality Engineering 2015-06-18 02:41:53 UTC
Integrated into 'main-silver', will be available in build *201506180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bb8209f71483
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #252514 - Maven project's output window doesn't show line consisting of number + "B"