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 262308 - Invalid @Override annotation added when delegating to static method
Summary: Invalid @Override annotation added when delegating to static method
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-02 11:51 UTC by Jiri Prox
Modified: 2016-06-02 11:51 UTC (History)
0 users

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 Jiri Prox 2016-06-02 11:51:51 UTC
Invalid @Override annotation added when delegating to static method

Have a code:
public class A {
    public static void m() {
        
    }
}


class B extends A{

    A a;  
      
}

in class B call "delegate method and select m() from field a

-> following code is added
@Override
    public static void m() {
        A.m();
    }
but annotation cannot be used in this case


Product Version: NetBeans IDE Dev (Build 201605260002)
Updates: Updates available
Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev