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 258906 - Autogenerated method in interface
Summary: Autogenerated method in interface
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2016-04-19 14:54 UTC by esapien
Modified: 2016-04-27 13:53 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description esapien 2016-04-19 14:54:57 UTC
When autogenerating a new, non-existent method on an interface by using the IDE assistant (e.g. alt+enter, "Create Method" option), the new method is generated in the interface as follows:

public int myMethod();

Since the method is on an interface, per language rules the "public" keyword could be ommited, e.g.:

int myMethod();


Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Linux version 3.11.10-21-desktop running on amd64
Java; VM; Vendor = 1.7.0_51
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Comment 1 Svata Dedic 2016-04-27 13:53:58 UTC
Missing some formatting option to generate / not generate public / public static for methods / constants in an interface.