Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334682 - Placeholder nodes for function invocations have function name null, which leads to NPE when rewriting the AST
Summary: Placeholder nodes for function invocations have function name null, which lea...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 13:14 EST by Max Schaefer CLA
Modified: 2020-05-14 11:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Schaefer CLA 2011-01-18 13:14:27 EST
Build Identifier: I20100608-0911

When creating a placeholder node for a FunctionInvocation (for instance through ASTRewrite.createCopyTarget or ASTRewrite.createMoveTarget), the function name of the newly created node is left at null (see NodeInfoStore.newPlaceholderNode). This can lead to a NPE during execution of ASTRewrite.rewriteAST, since this method eventually tries to visit all the children of the placeholder node. NodeInfoStore fills in dummy child nodes for other node types (for instance "for" statements and assignments), but not for function invocations; it should probably do so.

Reproducible: Always
Comment 1 Zhongwei Zhao CLA 2011-04-14 00:07:21 EDT
fixed in head
Comment 2 Kalin CLA 2011-08-03 08:51:36 EDT
Closing...