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.
When using Extract Interface or Extract Superclass refactoring, the resulting interface or superclass uses package-private access for all methods even if the original methods are declared public. This is obviously not appropriate behavior. Use the same access as the original (preferred) or use public always.
I cannot reproduce it. Can you provide the source? Note that keyword public is implicit for methods in interface.
Created attachment 72839 [details] The class
Created attachment 72840 [details] The extracted interface
The method is still public - it is defined in interface
You are correct about extract superclass, that one works. But I'd prefer if the methods could be specified explicitly as public as I know that me and many others like doing that (for example, most of the Java SE interfaces do this).
I see, so let's mark this issue as enhancement
From JLS ยง9.4: "It is permitted, but discouraged as a matter of style, to redundantly specify the public and/or abstract modifier for a method declared in an interface." Marking as wontfix.