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 222489 - Incorrect error badges when test classes shadow main codebase
Summary: Incorrect error badges when test classes shadow main codebase
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 18:57 UTC by _ gtzabari
Modified: 2012-11-22 02:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (209.96 KB, text/plain)
2012-11-20 18:57 UTC, _ gtzabari
Details
Testcase (3.77 KB, application/octet-stream)
2012-11-20 19:12 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2012-11-20 18:57:39 UTC
Created attachment 128161 [details]
messages.log

Product Version: NetBeans IDE Dev (Build 201211150001)
Java: 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

This issue is 100% reproducible, unfortunately only in a commercial application which I cannot share.

1. Create a Java Maven class
2. Declare classes A, B, C in the main classpath
3. Declare classes A, B, C in the test classpath but the test classes should have a different constructor signature in order to trigger compiler errors if the wrong class gets used.
4. Netbeans flags error badges in #3

I will attach messages.log as proof (search for "IncorrectErrorBadges")
Comment 1 _ gtzabari 2012-11-20 18:58:47 UTC
Please let me know if you can reproduce the problem on your end. If not, I will try digging deeper.
Comment 2 _ gtzabari 2012-11-20 19:12:32 UTC
Increasing to P2.

Reproduced using a fresh userdir, on build 201211200002. The attached testcase is tiny. Please take a look!
Comment 3 _ gtzabari 2012-11-20 19:12:50 UTC
Created attachment 128164 [details]
Testcase
Comment 4 _ gtzabari 2012-11-20 23:59:50 UTC
To clarify, you need to open AppTest in the editor in order to see the error badges. The errors aren't visible in the project tab.
Comment 5 Dusan Balek 2012-11-21 14:19:37 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/b26d4e83c469
Comment 6 Quality Engineering 2012-11-22 02:46:29 UTC
Integrated into 'main-golden', will be available in build *201211220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b26d4e83c469
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #222489: Incorrect error badges when test classes shadow main codebase - fixed.