Bug 122377 - Insert code -> Constructor, generated code does not call superconstructor
Insert code -> Constructor, generated code does not call superconstructor
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Editor
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Jan Lahoda
issues@java
release60_fixes_candidate1, release60...
: REGRESSION
: 122625 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-20 13:19 UTC by Petr Hejl
Modified: 2007-12-12 16:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2007-11-20 13:19:11 UTC
Present in RC1 (200711131200), in beta2 this works.

When using Insert Code -> Constructor in class that is inherited from other class that have some other than default
constructor - the generated code does not contain call to superconstructor so it is not compilable.

This works in beta2.

Example:
public class MyClass1 {
    public MyClass1(String s){}
}

public class MyClass2 extends MyClass1 {
    //try to insert constructor here
    //the generated code will be
    //public MyClass2(String s) {
    //}
}
Comment 1 Jan Lahoda 2007-11-20 16:42:53 UTC
Sorry, but I do not think this qualifies as P1.
Comment 2 Jan Lahoda 2007-11-20 16:59:05 UTC
Caused by fix of issue #103642. Hopefully fixed now. Tests for both this issue and issue #103642 are pending.

Checking in VeryPretty.java;
/cvs/java/source/src/org/netbeans/modules/java/source/pretty/VeryPretty.java,v  <--  VeryPretty.java
new revision: 1.73; previous revision: 1.72
done
Comment 3 Jan Lahoda 2007-11-26 09:00:49 UTC
*** Issue 122625 has been marked as a duplicate of this issue. ***
Comment 4 Jean-francois Denise 2007-11-27 11:08:05 UTC
Can we expect that this fix being integrated in release 60?
We don't have currently any workaround for it and it breaks our code generation.

JF.
Comment 5 Petr Blaha 2007-11-30 16:18:10 UTC
Petre, can you verify the fix? Thanks
Comment 6 Petr Hejl 2007-11-30 16:23:15 UTC
Ok now.
Comment 7 pgebauer 2007-12-03 14:17:23 UTC
The fix has been ported into the release60_fixes branch.

Checking in VeryPretty.java;
/cvs/java/source/src/org/netbeans/modules/java/source/pretty/VeryPretty.java,v  <--  VeryPretty.java
new revision: 1.71.4.1; previous revision: 1.71
done
Comment 8 Max Sauer 2007-12-10 10:29:29 UTC
Verified in 6.0 with patch1.
---
Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_05-ea; Java HotSpot(TM) Client VM 1.6.0_05-ea-b05
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/maxa/.netbeans/6.0


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