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

Summary: "Expose method..." hint brings over @java.lang.Override to an interface
Product: java Reporter: Chiana
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal CC: marfous
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:

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).