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.
The NetBeans default template for a MIDlet does not include the @Override annotations for startApp, pauseApp and destroyApp. Since ME8 Embedded project is JDK 7/8 compliant from class format point of view, the template should contain these annotations.
+ please, remove generation of pauseApp from new project template at all since this method is deprecated and non-abstract. Note, this requires fix on ME SDK side as well since our API libs declares this method as abstract (will be fixed in few days).
(In reply to alexander.burdukov from comment #0) > The NetBeans default template for a MIDlet does not include the @Override > annotations for startApp, pauseApp and destroyApp. > > Since ME8 Embedded project is JDK 7/8 compliant from class format point of > view, the template should contain these annotations. We can't simply add the @Override annotation to the template, because it can make the class uncompilable. E.g.: if a user sets source level to < 1.5. If this should be handled, it will probably require some changes in the Java Source. Therefore I'm reassigning this issue to Tomas. (In reply to alexander.burdukov from comment #1) > + please, remove generation of pauseApp from new project template at all > since this method is deprecated and non-abstract. > > Note, this requires fix on ME SDK side as well since our API libs declares > this method as abstract (will be fixed in few days). This can be fixed (removed) easily, please let us know when you'll have the fix ready on the ME side.
> This can be fixed (removed) easily, please let us know when you'll have the > fix ready on the ME side. The fix on ME SDK side was done a couple of weeks ago. So, you can take any latest ME SDK build.
> We can't simply add the @Override annotation to the template, because it can > make the class uncompilable. E.g.: if a user sets source level to < 1.5. If > this should be handled, it will probably require some changes in the Java > Source. Therefore I'm reassigning this issue to Tomas. ME 8 does not support class file format early than JDK 7. And I do not think you have to support source level < JDK 7 when binary format >= JDK 7. So, I guess you can simple add these annotation, but in the same allow JDK7+ source/binary format only for Java ME Embedded projects
No changes in java.source are needed. Just a bit improving the template. Fixed jet-main 9590aeda8469
Removed: http://hg.netbeans.org/jet-main/rev/93e5a5bf9ebc (In reply to alexander.burdukov from comment #1) > + please, remove generation of pauseApp from new project template at all > since this method is deprecated and non-abstract.
Integrated into 'main-silver', will be available in build *201404080419* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9590aeda8469 User: Tomas Zezula <tzezula@netbeans.org> Log: #242473:New ME Embedded Project Template Requires Improvements
@Override annotation was not added
Strange works fine in J2SE and others, but does not in J2ME. It's a problem in the core of J2ME project. Unfortunately it's my code anyway, so I will need to fix it. ;-) The funny part is that you found much more serious issue than missing @Override. After the fix 9590aeda8469 the @Override is not added only in the J2ME project. It's not added because the J2ME project either does not return source level at all or it returns the the source level of JDK NB runs on depending on state of J2ME project. Both such a source levels are clearly wrong. As a source level controls nearly everything in java language module upgrading the issue to P1.
Fixed jet-main c0394866883e
Integrated into 'main-silver', will be available in build *201404180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/c0394866883e User: Tomas Zezula <tzezula@netbeans.org> Log: #242473:New ME Embedded Project Template Requires Improvements
Verified on the latest nightly. Seems fixed now.
Transplanted to patch1: d30fe39c16c2 45492f3637b6 a0e2d5835fab 53743f7fdc8c
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/d30fe39c16c2 User: Tomas Zezula <tzezula@netbeans.org> Log: #242473:New ME Embedded Project Template Requires Improvements
Verified on NetBeans 8.0 with all updates available on Apr 30, 2014 applied. Works for me. Closing.