Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357986 - NPE Thrown when generating a reference to a function in a delegate array
Summary: NPE Thrown when generating a reference to a function in a delegate array
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 15:37 EDT by Brian Svihovec CLA
Modified: 2017-02-23 14:15 EST (History)
2 users (show)

See Also:


Attachments
Testcase. (1.09 KB, application/octet-stream)
2011-09-16 15:37 EDT, Brian Svihovec CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Svihovec CLA 2011-09-16 15:37:01 EDT
Created attachment 203520 [details]
Testcase.

Import the attached testcase.

When you generate the handler you will get the following exception:

org.eclipse.edt.mof.codegen.api.TemplateException: java.lang.NullPointerException
	at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:384)
	at org.eclipse.edt.mof.codegen.api.TemplateContext.invoke(TemplateContext.java:260)
	at org.eclipse.edt.gen.javascript.templates.ArrayTypeTemplate.genConversionOperation(ArrayTypeTemplate.java:129)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:359)
	at org.eclipse.edt.gen.EglContext.invoke(EglContext.java:397)
	at org.eclipse.edt.gen.javascript.templates.AsExpressionTemplate.genExpression(AsExpressionTemplate.java:25)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

Caused by: java.lang.NullPointerException
	at org.eclipse.edt.gen.EglContext.getTemplateMethod(EglContext.java:430)
	at org.eclipse.edt.gen.EglContext.invoke(EglContext.java:392)
	at org.eclipse.edt.gen.javascript.templates.ArrayLiteralTemplate.genExpression(ArrayLiteralTemplate.java:27)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:357)
	... 185 more
Comment 1 Brian Svihovec CLA 2011-09-16 15:37:20 EDT
This blocks the RUI Technical Sample.
Comment 2 Scott Greer CLA 2011-09-26 17:25:38 EDT
I changed the handler into a library, disabled JS gen and enabled Java gen to prove that this problem also exists in Java;  consulting with Jeff to get a common fix....
Comment 3 Brian Svihovec CLA 2011-10-17 22:37:00 EDT
This no longer seems to be happening?
Comment 4 Scott Greer CLA 2011-10-18 15:12:17 EDT
It's been awhile;  I can't recall whether this was the bug where Jeff made a change to both generators to at least fix the immediate symptom but not the problem.....does the code actually work as expected?
Comment 5 Brian Svihovec CLA 2011-10-19 12:52:13 EDT
This appear to be working correctly, so go ahead and mark this one as resolved.
Comment 6 Scott Greer CLA 2011-10-19 15:24:27 EDT
Brian, that's good news....marking it fixed.
Comment 7 Lisa Lasher CLA 2011-11-09 14:13:24 EST
This high severity defect was fixed several weeks ago, so I am closing.