Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355006 - NPE using Implement method on template function
Summary: NPE using Implement method on template function
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0.1   Edit
Assignee: Marc-André Laperle CLA
QA Contact: Emanuel Graf CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 15:43 EDT by Marc-André Laperle CLA
Modified: 2011-08-28 15:23 EDT (History)
1 user (show)

See Also:


Attachments
NPE patch (4.22 KB, patch)
2011-08-28 14:58 EDT, Marc-André Laperle CLA
malaperle: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2011-08-17 15:43:57 EDT
java.lang.NullPointerException
	at org.eclipse.cdt.internal.ui.refactoring.implementmethod.ImplementMethodRefactoring.createFunctionDefinition(ImplementMethodRefactoring.java:267)
	at org.eclipse.cdt.internal.ui.refactoring.implementmethod.ImplementMethodRefactoring.createDefinition(ImplementMethodRefactoring.java:192)
	at org.eclipse.cdt.internal.ui.refactoring.implementmethod.ParameterNamesInputPage.createFunctionDefinitionSignature(ParameterNamesInputPage.java:136)
	at org.eclipse.cdt.internal.ui.refactoring.implementmethod.ParameterNamesInputPage$2.run(ParameterNamesInputPage.java:160)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I'm not sure of how to reproduce it yet outside the code I can't share.
Comment 1 Marc-André Laperle CLA 2011-08-17 20:28:51 EDT
This can be reproduced by using Implement Method on a file containing this function declaration

template<typename T> void func(T&);
Comment 2 Marc-André Laperle CLA 2011-08-28 14:58:56 EDT
Created attachment 202284 [details]
NPE patch
Comment 3 Marc-André Laperle CLA 2011-08-28 15:01:34 EDT
Fixed in 8.0.1 and master > 20110828.
Comment 4 CDT Genie CLA 2011-08-28 15:23:02 EDT
*** cdt git genie on behalf of Marc-Andre Laperle ***

    Bug 355006 - NPE using Implement method on template function

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=dda266c4787b7a03111f4e500b5438106a9851b0
Comment 5 CDT Genie CLA 2011-08-28 15:23:03 EDT
*** cdt git genie on behalf of Marc-Andre Laperle ***

    Bug 355006 - NPE using Implement method on template function

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=82272a796535b23d3884a047cfb2c0628ee884d6