Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334682

Summary: Placeholder nodes for function invocations have function name null, which leads to NPE when rewriting the AST
Product: z_Archived Reporter: Max Schaefer <max.schaefer>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED FIXED QA Contact: Ilina Stefanova <ilina.s>
Severity: normal    
Priority: P3 CC: kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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...