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.
060531 -create new project with HelloMidlet -Create Junit tests from popup menu on the hello package -the output in console: inspecting fileobject: HelloMidlet Adding classes from HelloMidlet to test generation que. inspecting fileobject: HelloMidlet null INFO [stderr]: java.lang.NullPointerException INFO [stderr]: at org.netbeans.modules.kjava.j2meunit.TestUtils.getAllClassesFromFile(TestUtils.java:76) INFO [stderr]: at org.netbeans.modules.kjava.j2meunit.TestCreator.generateTests(TestCreator.java:141) INFO [stderr]: at org.netbeans.modules.kjava.j2meunit.J2MEUnitPlugin.createTests(J2MEUnitPlugin.java:69) INFO [stderr]: at org.netbeans.modules.junit.plugin.JUnitPlugin$1.createTests(JUnitPlugin.java:46) INFO [stderr]: at org.netbeans.modules.junit.CreateTestAction.performAction(CreateTestAction.java:181) INFO [stderr]: at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:531) INFO [stderr]: at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:81) INFO [stderr]: at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:75) INFO [stderr]: at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:24) INFO [stderr]: at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:72) INFO [stderr]: at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:41) INFO [stderr]: at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:516) INFO [stderr]: at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:949) SEVERE [org.openide.util.RequestProcessor] java.lang.NullPointerException at org.netbeans.modules.kjava.j2meunit.TestCreator.generateTests(TestCreator.java:160) at org.netbeans.modules.kjava.j2meunit.J2MEUnitPlugin.createTests(J2MEUnitPlugin.java:69) at org.netbeans.modules.junit.plugin.JUnitPlugin$1.createTests(JUnitPlugin.java:46) at org.netbeans.modules.junit.CreateTestAction.performAction(CreateTestAction.java:181) at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:531) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:81) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:75) at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:24) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:72) at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:41) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:516) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:949) *It seems that the root cause is the visual midlet because generating of tests for a package without a visual midlet works*
generating of tests for visual midlet work when it's invoked from popup menu on the visual midlet
moving to mobility component
fixed. the problem was that when you iterate through all data files returned on a package, the test generator was trying to get a resource on such data files as mvd and the resource returned was null because you can only get resource on valid java files. added filter to make only java files testable.
verified in jars from 0627, no NPE
verified in 5.5 Beta2 candidate