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 262675 - Order Members should treat static and non-static interfaces the same
Summary: Order Members should treat static and non-static interfaces the same
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-05 03:32 UTC by _ gtzabari
Modified: 2016-07-05 03: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 _ gtzabari 2016-07-05 03:32:10 UTC
Product Version: NetBeans IDE Dev (Build 201606200002)
Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14
System: Windows 10 version 10.0 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

Repro steps:

1. Assuming that "static classes" are ordered before "classes" in Project -> properties -> formatting -> Java -> ordering -> Member sort order
2. Create the following Java file:

public class Outer
{
  public static interface First
  {}

  public void someMethod()
  {}

  public interface Second
  {}
}

3. Notice that Netbeans is happy with the member ordering found above.
4. Now, add the "static" modified to "Second"
5. Notice that Netbeans prompts you to "Order Members"

Expected behavior: interfaces, whether they contain the "static" modifier or not, should be treated consistently (be it non-static or static). Technically speaking, I believe that they should be treated as static as they do not (nor can they) reference the outer class.