Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 122625 - TreeMaker.constructor skips call to super
TreeMaker.constructor skips call to super
Status: RESOLVED DUPLICATE of bug 122377
Product: java
Classification: Unclassified
Component: Source
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Jan Lahoda
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-23 11:28 UTC by Jean-francois Denise
Modified: 2007-12-07 16:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-francois Denise 2007-11-23 11:28:46 UTC
I am calling this operation with a textual body.
Inside the body, first line is :

super(...);

This line is not added when the code is actually generated.
Looking at the TreeMaker implementation, it seems that this bug would occurs in any Method body generation
based on text.
Comment 1 Jean-francois Denise 2007-11-23 18:17:46 UTC
I tried creating a Block, I run into the same problem. Here is the code I use. If the Identifier is something
else than super, it works well...

 IdentifierTree toto = maker.Identifier("super");// NOI18N
 LiteralTree mxbean = maker.Literal(Boolean.TRUE);
 List<ExpressionTree> ps = new ArrayList<ExpressionTree>(1);
 ps.add(mxbean);
 MethodInvocationTree printlnInvokation =
                            maker.MethodInvocation(Collections.<ExpressionTree>emptyList(),
                            toto,
                            ps);
 ExpressionStatementTree t2 = maker.ExpressionStatement(printlnInvokation);
                
Comment 2 Jan Lahoda 2007-11-26 09:02:15 UTC
This sounds very much like issue #122377.

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


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