Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362507 - NullPointerException on Plus and Concat in EList
Summary: NullPointerException on Plus and Concat in EList
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 blocker (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 362629 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-31 12:15 EDT by broy2 CLA
Modified: 2017-02-23 14:15 EST (History)
4 users (show)

See Also:


Attachments
fix (7.28 KB, patch)
2011-11-03 02:16 EDT, Huang Ji Yong CLA
lasher: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-10-31 12:15:10 EDT
NPE on newList = myNames + element; 

program plusProb type BasicProgram {}
    myNames string[] =["Carolina", "State", "Duke"];
    element string = "Meredith";
    newList string[];
    function main()
        newList = myNames + element;  
    end
end

Multiple markers at this line
IWN.JavascriptGen.9998.e 8/188 Exception occurred: java.lang.NullPointerException
IWN.JavascriptGen.9999.e 8/188 Stack Trace: java.lang.NullPointerException
Comment 1 Brian Svihovec CLA 2011-10-31 23:18:11 EDT
Does this testcase fail when generating Java as well?  If not, this should probably go to the JS Gen component.
Comment 2 Paul Harmon CLA 2011-11-02 09:24:20 EDT
I am routing this to JSGen, since this is working in JavaGen.

The "+" operator to concatenate elements to a list is being removed (will give errors in validation). The only valid operator for concatenation to an array is "::", and the only valid concatenation assignment is "::="
Comment 3 broy2 CLA 2011-11-02 09:52:48 EDT
OK, changed the program to use ::.
Still have errors in the editor which prevent testing in Java and JS. 

program plusProb type BasicProgram {}
    myNames string[] =["Carolina", "State", "Duke"];
    element string = "Meredith";
    newList string[];
    function main()
        newList = myNames :: element;  
    end
end

IWN.JavascriptGen.9998.e 8/188 Exception occurred: java.lang.NullPointerException	
IWN.JavascriptGen.9999.e 8/188 Stack Trace: java.lang.NullPointerException
Comment 4 Huang Ji Yong CLA 2011-11-03 01:46:13 EDT
*** Bug 362629 has been marked as a duplicate of this bug. ***
Comment 5 Huang Ji Yong CLA 2011-11-03 02:16:24 EDT
Created attachment 206380 [details]
fix
Comment 6 Huang Ji Yong CLA 2011-11-03 02:19:13 EDT
This is a regression of bug 362155.
Widget qualifier has to be handled differently.
Comment 7 broy2 CLA 2011-11-03 11:19:43 EDT
Verified in 20111103 build.