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 80461 - Show All Errors/Show Failures button breaks Junit results window
Summary: Show All Errors/Show Failures button breaks Junit results window
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-18 10:43 UTC by Max Sauer
Modified: 2006-10-23 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
AE and AIOOBE stack trace (5.12 KB, text/plain)
2006-07-18 10:44 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2006-07-18 10:43:57 UTC
Usage of "Show All Errors/Show Failures" button breaks Junit results window, and
throws AE's and AIOOBE's:

java.lang.AssertionError
	at org.netbeans.modules.junit.output.TestsuiteNode.<init>(TestsuiteNode.java:69)
	at org.netbeans.modules.junit.output.TestsuiteNode.<init>(TestsuiteNode.java:50)
	at
org.netbeans.modules.junit.output.RootNodeChildren.createNode(RootNodeChildren.java:254)
...
=============
java.lang.ArrayIndexOutOfBoundsException: 0
	at
org.netbeans.modules.junit.output.RootNodeChildren.removePassedSuites(RootNodeChildren.java:293)
	at
org.netbeans.modules.junit.output.RootNodeChildren.setFiltered(RootNodeChildren.java:275)
	at org.netbeans.modules.junit.output.RootNode.setFiltered(RootNode.java:150)
	at
org.netbeans.modules.junit.output.ResultPanelTree.setFiltered(ResultPanelTree.java:240)
	at
org.netbeans.modules.junit.output.ResultPanelTree.itemStateChanged(ResultPanelTree.java:145)
...
(whole stack trace attached)

Steps to reproduce:
-------------------
1) Open a j2se project with both passing and failing tests
2) Test whole project (alt-F6)
3) Use Show All Errors/Show Failures button two times
==> AE, AIOOBE, no results shown from then on

-------------
NetBeans IDE Dev (Build 200607171800)
1.6.0-rc; Java HotSpot(TM) Server VM 1.6.0-rc-b90
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 1 Max Sauer 2006-07-18 10:44:34 UTC
Created attachment 31948 [details]
AE and AIOOBE stack trace
Comment 2 Max Sauer 2006-07-18 13:01:09 UTC
This is probably caused by fix of issue 73541.
Comment 3 Marian Petras 2006-07-18 13:41:49 UTC
Confirmed, accepted.
Comment 4 Marian Petras 2006-07-18 13:44:45 UTC
Fixed in the trunk.

It was caused by a trivial bug - see the diff.

Modified file:
   junit/src/org/netbeans/modules/junit/output/TestsuiteNode.java   (1.5)

Diff:
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/TestsuiteNode.java?r1=1.4&r2=1.5&diff_format=u
Comment 5 Max Sauer 2006-07-18 14:24:23 UTC
Verified in a custom build.

-------
NetBeans IDE Dev (Build 060718)
1.5.0_05; Java HotSpot(TM) Server VM 1.5.0_05-b05
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 6 Marian Petras 2006-09-04 18:11:46 UTC
This (trivial) bug was introduced with changes made to fix bug #73541
("Assertion for some types of XML output").
Comment 7 Max Sauer 2006-09-05 08:15:53 UTC
Marking as 5.5_candidate, along with issue 73541.
Comment 8 Max Sauer 2006-09-05 12:40:10 UTC
The patch for r5.5, resolving issue 73541 will be applied w/o the buggy section,
so this one would not be needed. Removing 5.5_candidate SW.