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.
All tests fail with SecurityException because it is not allowed to create a new instance of MIDlet. 1) testcommandAction(hello.HelloMidletTest) java.lang.SecurityException: Application not authorized to access the restricted API at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(SecurityToken.java:170) at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(SecurityToken.java:145) at com.sun.midp.midletsuite.MIDletSuiteImpl.checkIfPermissionAllowed(MIDletSuiteImpl.java:281) at com.sun.midp.midlet.MIDletState.<init>(MIDletState.java:301) at javax.microedition.midlet.MIDletProxy.<init>(MIDletProxy.java:33) at javax.microedition.midlet.MIDlet.<init>(MIDlet.java:70) at hello.HelloMidlet.<init>(HelloMidlet.java:19) at hello.HelloMidletTest.testcommandAction(HelloMidletTest.java:32) at hello.HelloMidletTest$1.run(HelloMidletTest.java:154) at j2meunit.framework.TestCase.runTest(+18) at j2meunit.framework.TestCase.runBare(+8) at j2meunit.framework.TestResult$1.protect(+7) at j2meunit.framework.TestResult.runProtected(+6) at j2meunit.framework.TestResult.run(+21) at j2meunit.framework.TestCase.run(+10) at j2meunit.framework.TestSuite.run(+41) at j2meunit.framework.TestSuite.run(+41) at j2meunit.midletui.TestRunner.doRun(+33) at j2meunit.midletui.TestRunner$1.run(+11)
This issue is caused by the fact that you cannot create new instances of MIDlet classes, only the AMS can do that. This means that we cannot create regular j2meunit tests for MIDlet classes. The workaround is to generate a new MIDlet TestRunner class based on the tested MIDlet class inside which the tests will run. This is not a pretty hack and as such we should consider this as an advanced feature for 6.0 or we should skip it completely. For the 55 release all MIDlet classes will be filtered out from the test generation que.
verified with jars 0627, Midlets are filtered out.
the general policy for issuezilla is "do not use the LATER/REMIND" resolution. (http://qa.netbeans.org/bugzilla/issue-lifecycle.html). These states are confusing and should be removed from issuezilla (unfortunately colabnet doesn't know how to do it). Bug shouldn't be in RESOLVED state until it is really resolved. IMO, that's not the case of LATER/REMIND. Please, reevaluate the issue 1, When you don't plan to fix the issue close it as WONTFIX 2, you don't want to fix it now -> use TM=future thank you for understanding
*** Issue 83748 has been marked as a duplicate of this issue. ***
Can not add this feature as the support is still missing
Fixed Checking in TestCreator.java; /cvs/mobility/j2meunit/src/org/netbeans/modules/mobility/j2meunit/TestCreator.java,v <-- TestCreator.java new revision: 1.16; previous revision: 1.15 done Checking in J2MEUnitPlugin.java; /cvs/mobility/j2meunit/src/org/netbeans/modules/mobility/j2meunit/J2MEUnitPlugin.java,v <-- J2MEUnitPlugin.java new revision: 1.4; previous revision: 1.3 done Checking in TestUtils.java; /cvs/mobility/j2meunit/src/org/netbeans/modules/mobility/j2meunit/TestUtils.java,v <-- TestUtils.java new revision: 1.12; previous revision: 1.11 done
verified in 20071016 build test skeletons are not generated for midlets