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

Summary: Autogenerated method in interface
Product: java Reporter: esapien
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 8.0.2   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

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();

Regards


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.