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 126867 - valid semi-column after comma in enum breaks formatting
Summary: valid semi-column after comma in enum breaks formatting
Status: RESOLVED DUPLICATE of bug 121255
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-06 21:24 UTC by ymajoros
Modified: 2008-02-07 07:34 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 ymajoros 2008-02-06 21:24:53 UTC
This simple enum, although strange, is valid. In fact, this is something I get from after formatting in some jdeveloper
versions. It compiles fine but breaks on reformatting:

public enum X {
    
    A,
    B,
    ;
        private String a;
        private Class b;

        private X(String c) {
        }
        
}

Is reformatted as this (invalid, not compilable) code:

public enum x {

    A,
    B,
      ;
    private  String a;

    private  Classb ; 
    


private x(String c) {
        }
        
}
Comment 1 ymajoros 2008-02-06 21:25:54 UTC
(note the Classb instead of Class b)
Comment 2 Jiri Prox 2008-02-07 07:34:31 UTC
This works fine in current daily build, it was probably fixed with issue 121255.
Thanks for your report.

*** This issue has been marked as a duplicate of 121255 ***