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 193202 - "Expose method..." hint brings over @java.lang.Override to an interface
Summary: "Expose method..." hint brings over @java.lang.Override to an interface
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.0
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 04:39 UTC by Chiana
Modified: 2012-11-30 02:38 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 Chiana 2010-12-10 04:39:39 UTC
[ JDK VERSION : 1.6.22 ]

Examine the following class(es)
@Stateless
public class NewClass
        extends OldClass
        implements NewClassFacade {

  @Override
  public void doIt() {
    new Call("police", 112);
  }
}

abstract class OldClass {
  public abstract void doIt();
}
Nothing spectacular, a standard business interface, however, if you created the
NewClassFacade without (or add a new one) with the "Expose method..." hint  to
an empty interface it will end up looking like this;
interface NewClassFacade {

  @java.lang.Override
  public void doIt();

}
...wich will cause an error.
Comment 1 Jan Lahoda 2012-11-28 13:42:28 UTC
Fixed:
http://hg.netbeans.org/jet-main/rev/1d4393bb31b8

Martin, should this break something in the ejbverification, please let me know. Thanks.
Comment 2 Quality Engineering 2012-11-30 02:38:30 UTC
Integrated into 'main-golden', will be available in build *201211300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1d4393bb31b8
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #193202: when exposing method (pushing it into an interface), do not use TreeMaker.Method(ExecutableElement, ...), as that will also copy the annotations and generally should not be used (making it deprecated as well).