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.
See issue 179862: The Java Card platform for classic applets/libraries (A Java Card platform has two separate boot classpaths, one for Java Card 2 projects [no java.lang.String, no floating point], another for Java Card 3 projects [more complete but still no collections and no floating point]). But Java Card projects are source-level 1.6. NetBeans generates uncompilable code with @Override when using editor features that generate method overrides (override method, add all abstract methods, add @Override annotation hint, etc.) - they are annotated with @Override, but it cannot be compiled. I cannot fix this in the Java Card module (see comments on issue 179862). Need the editor infrastructure either not to generate @Override annotations if the Override annotation is not in the project boot classpath, or a quick hack to allow a Java Platform to provide some token to indicate that annotations of this kind should not be generated.
Integrated into 'main-golden', will be available in build *201002040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/76d286f8f580 User: Jan Lahoda <jlahoda@netbeans.org> Log: #180165: override is supported only if the source level > 1.5, and java.lang.Override is available on the classpath.
So this is fixed?
Yes, I hope so.
Thanks for the super-rapid response!
Sorry - it looks like this needs to be fixed in GeneratorUtilities.createMethod() in java.source - GeneratorUtils.supportsOverride(CompilationInfo) is not called in the path of the Override Methods hint.
Hotfixed in main/ 71d0594c59ae Please review.
Integrated into 'main-golden', will be available in build *201002180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/71d0594c59ae User: Tim Boudreau <tboudreau@netbeans.org> Log: #180165 - @Override annotations generated in projects (Java Card) where java.lang.Override is not on the boot classpath