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.
Summary: | Generating methods in enum constant body doubles the constant declararion | ||
---|---|---|---|
Product: | java | Reporter: | Jiri Prox <jiriprox> |
Component: | Source | Assignee: | Svata Dedic <sdedic> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | gtzabari, swpalmer |
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jiri Prox
2008-09-03 14:12:02 UTC
*** Issue 151617 has been marked as a duplicate of this issue. *** *** Issue 157088 has been marked as a duplicate of this issue. *** Overtake. *** Issue 163170 has been marked as a duplicate of this issue. *** Reassigning all moonko's java/source bugs to myself. Jan, The Target Milestone of this issue is out of date. Please review. Seems that the usecase above is no longer reproducible in a current daily build. If there is a particular usecase where this still fails, please specify it here and reopen. Thanks. Jan, I am using: Product Version: NetBeans IDE Dev (Build 201107220600) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) Code-complete no longer corrupts the class, but the functionality still doesn't work. 1. Given this class: public enum Role { ADMIN_USER { }, REGUALAR_USER, SUPER_USER; public void m() { } } 2. Place the caret inside the body of ADMIN_USER constant 3. Use code-complete (CTRL+SPACEBAR) to override m() 4. Bug #1: Nothing happens (no code is generated). 5. Place the caret inside the body of ADMIN_USER constant 6. Use Generate Code (ALT+INSERT) to override m() 7. Bug #2: ArrayIndexOutOfBoundsException is thrown. See http://statistics.netbeans.org/analytics/detail.do?id=180119 Either way, it doesn't seem to be possible to override m(). This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss Seems to be fixed in dev build 201607060002. |