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 242473 - New ME Embedded Project Template Requires Improvements
Summary: New ME Embedded Project Template Requires Improvements
Status: CLOSED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-01 00:33 UTC by alexander.burdukov
Modified: 2014-04-30 16:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.burdukov 2014-03-01 00:33:13 UTC
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.
Comment 1 alexander.burdukov 2014-03-01 00:57:56 UTC
+ 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).
Comment 2 Roman Svitanic 2014-04-03 14:13:14 UTC
(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.
Comment 3 alexander.burdukov 2014-04-03 14:17:16 UTC
> 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.
Comment 4 alexander.burdukov 2014-04-03 14:26:23 UTC
> 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
Comment 5 Tomas Zezula 2014-04-07 09:04:22 UTC
No changes in java.source are needed.
Just a bit improving the template.
Fixed jet-main 9590aeda8469
Comment 6 Roman Svitanic 2014-04-07 09:28:39 UTC
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.
Comment 7 Quality Engineering 2014-04-08 06:09:50 UTC
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
Comment 8 alexander.burdukov 2014-04-16 17:02:39 UTC
@Override annotation was not added
Comment 9 Tomas Zezula 2014-04-16 18:00:37 UTC
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.
Comment 10 Tomas Zezula 2014-04-16 20:51:48 UTC
Fixed jet-main c0394866883e
Comment 11 Quality Engineering 2014-04-18 02:43:17 UTC
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
Comment 12 alexander.burdukov 2014-04-18 17:10:21 UTC
Verified on the latest nightly. Seems fixed now.
Comment 13 Tomas Zezula 2014-04-23 07:47:05 UTC
Transplanted to patch1:
d30fe39c16c2
45492f3637b6
a0e2d5835fab
53743f7fdc8c
Comment 14 Quality Engineering 2014-04-24 02:15:59 UTC
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
Comment 15 alexander.burdukov 2014-04-30 16:39:57 UTC
Verified on NetBeans 8.0 with all updates available on Apr 30, 2014 applied.
Works for me.
Closing.