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 268253 - Incorrect formatting of comments inside case statement
Summary: Incorrect formatting of comments inside case statement
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: Dev
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2016-09-28 16:31 UTC by _ gtzabari
Modified: 2016-09-28 16:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2016-09-28 16:31:23 UTC
Product Version: NetBeans IDE Dev (Build 201609200002)
Java: 1.8.0_102; Java HotSpot(TM) 64-Bit Server VM 25.102-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_102-b14
System: Windows 10 version 10.0 running on amd64; UTF-8; en_US (nb)
User directory: C:\Users\a-gtzabari\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\a-gtzabari\AppData\Local\NetBeans\Cache\dev


public class SomeClass
  private void someMethod()
    int value = 5;
// Commented-out code1
    switch (value)
      case 5:
// Commented-out code2

If you code-format, Comment 1 will remain at column 0 but Comment 2 will be vertically-aligned inside "case 5".

Expected behavior: Comment 2 should not be moved.