Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 137139 - Generating constructor removes inner class
Generating constructor removes inner class
Product: java
Classification: Unclassified
Component: Editor
PC All
: P2 (vote)
: 6.x
Assigned To: Jan Lahoda
Depends on:
  Show dependency treegraph
Reported: 2008-06-12 21:40 UTC by Miloslav Metelka
Modified: 2008-09-04 13:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2008-06-12 21:40:45 UTC
Today's dev build 080612. Have a following class:

package bugs;

public final class B {
    private final class C1 {

    private final class C2 {
        int i;


where '|' denotes cursor position. Now press Ctrl+Space and code completion offers "C1() - generate". If I press Enter
the constructor gets generated but the whole C2 definition will disappear. The "C" before caret is important without it
the generation works correctly.
Comment 1 Jan Lahoda 2008-06-17 09:43:44 UTC
I was not able to reproduce as such (an assertion failed for me, but results could be ugly with assertions disabled),
but hopefully fixed by:;node=4823969883db

Jirka, might be a good candidate for a 6.1 patch.
Comment 2 Jiri Prox 2008-06-17 09:55:20 UTC
Yes I agree, this is good candidate for patch
Comment 3 rbalada 2008-07-17 11:50:54 UTC

could you please verify fix for this issue in trunk builds?

Comment 4 Jiri Prox 2008-07-28 13:22:28 UTC
verified in trunk

Product Version: NetBeans IDE Dev (Build 20080728044253)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)
Comment 5 rbalada 2008-07-28 17:18:24 UTC
I've transplanted the changeset;node=4823969883db into release61_fixes
repository as
Comment 6 Jiri Prox 2008-08-21 09:08:44 UTC
verified in patch

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo