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.
Build: NetBeans IDE 8.0 (Build 201403101706) VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132 OS: Linux User Comments: jkovalsky: I had JUnitSampleProjectMaven testing project opened with tests generated for whole teststorun package initially with JUnit 3.* library. All tests were run, then I changed CalculatorTest.testDivide() test and wanted to debug it. IDE suggested to update JUnit library to 4.* and update pom.xml automatically. I agreed and replaced the library. Then I tried to debug that testDivide() method when this error probably occurred. GUEST: Called create unit tests while having some errors in test files EduardKarelEtc: attempting to create junit test for a package. GUEST: Auto-creation (<Ctrl>+<U>) of a Test Class for a Java class. GUEST: 1. Start the computer 2. Start Netbean 3. Click on an old java file in the editor. 4. Go to tools and create test. GUEST: . tboudreau: Pasted the inner class below into an empty unit test: public class ValidationUITest { private class UI implements ValidationUI { Problem p; boolean cleared; public void assertCleared() { boolean old = cleared; cleared = false; assertTrue(old); } public void assertNotCleared() { assertFalse(cleared); } public void assertProblem(String msg) { assertNotNull(p); assertEquals(msg, p.getMessage()); cleared = false; } public void clearProblem() { cleared = true; p = null; } public void setProblem(Problem problem) { p = problem; } public void assertNotProblem() { assertNull(p); } } } Stacktrace: java.lang.IndexOutOfBoundsException: Index: 11, Size: 8 at com.sun.tools.javac.util.List.get(List.java:475) at org.netbeans.modules.junit.AbstractTestGenerator.findAbstractClassImplName(AbstractTestGenerator.java:1917) at org.netbeans.modules.junit.AbstractTestGenerator.generateMissingTestMethods(AbstractTestGenerator.java:976) at org.netbeans.modules.junit.AbstractTestGenerator.createOrUpdateTestClass(AbstractTestGenerator.java:354) at org.netbeans.modules.junit.AbstractTestGenerator.run(AbstractTestGenerator.java:282) at org.netbeans.modules.junit.AbstractTestGenerator.run(AbstractTestGenerator.java:119)
Created attachment 145995 [details] stacktrace
Changeset: 67e20af47f22 Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2014-07-17 16:53 Message:
Integrated into 'main-silver', will be available in build *201407190718* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/67e20af47f22 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Task #242867 - IndexOutOfBoundsException: Index: 11, Size: 8
Product Version: NetBeans IDE Dev (Build 201408210001) Updates: Updates available Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26 System: Linux version 3.13.0-24-generic running on amd64; UTF-8; en_US (nb) User directory: /home/cesilko/.netbeans/dev Cache directory: /home/cesilko/.cache/netbeans/dev Works fine now i.e. didn't encounter the same exception when trying scenarios mentioned in this issue.