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 108373 - Formatting an enum breaks the code
Summary: Formatting an enum breaks the code
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
: 114459 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-28 10:36 UTC by _ leonchiver
Modified: 2007-09-03 07:43 UTC (History)
1 user (show)

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 _ leonchiver 2007-06-28 10:36:31 UTC
You have the enum:

public enum TestEnum {

    ONE(1), TWO(2);
    
    private TestEnum(int i) {
    }

}

and you format it (Menu / Source / Format). You get:

public enum TestEnum {

    ONE,
    TWO;

    private TestEnum(int i) {
    }
}

As you can see the arguments for the constructors are lost.
Comment 1 Pavel Flaska 2007-07-13 14:09:28 UTC
Reproducible, small defect in perfect Jackpot engine...
Comment 2 Pavel Flaska 2007-07-13 14:12:03 UTC
Checking in org/netbeans/modules/java/source/pretty/VeryPretty.java;
/cvs/java/source/src/org/netbeans/modules/java/source/pretty/VeryPretty.java,v  <--  VeryPretty.java
new revision: 1.45; previous revision: 1.44
done
Comment 3 Jiri Prox 2007-09-03 07:43:27 UTC
*** Issue 114459 has been marked as a duplicate of this issue. ***