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 226941 - IDE does not offer overriding of default methods of the implemented interface
Summary: IDE does not offer overriding of default methods of the implemented interface
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-03 12:41 UTC by rudyment
Modified: 2013-04-03 11:32 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 rudyment 2013-03-03 12:41:53 UTC
Product Version = NetBeans IDE Dev (Build jdk8lambda-1667-on-20130301)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0-ea
Runtime = OpenJDK 64-Bit Server VM 25.0-b19


After pressing the Alt+Insert command pou-up window Generate appears with command (among others) Override methods.

After entering this command the window does not offer to override the methods inherited from interface with default implementation.
Comment 1 Jiri Prox 2013-03-15 22:24:37 UTC
I'm not sure if I understand the description correctly, but if the methods are abstract (e.g. they are defined in interface) then you have to select 'Implement method'  to get the default implementation
Comment 2 rudyment 2013-03-16 13:44:20 UTC
(In reply to comment #1)
> I'm not sure if I understand the description correctly, but if the methods are
> abstract (e.g. they are defined in interface) then you have to select
> 'Implement method'  to get the default implementation

In Java 8 the interfaces can suggest defalut implementation of declared methods - e.g.:

interface Interface {
   default void method() {
      //here is the default implementation
   }
}

The implementing classes can override these default implementation and therefore NetBeans should suggest this posibility.
Comment 3 Jiri Prox 2013-03-18 11:20:06 UTC
Thanks for explanation
Comment 4 Quality Engineering 2013-03-24 01:54:45 UTC
Integrated into 'main-golden', will be available in build *201303232300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/89f8ad0a1cb9
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #226941: IDE does not offer overriding of default methods of the implemented interface - fixed.