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

Bug 350964

Summary: [exceptions] Potential NPE if reciever of prototype field object cannot be resolved
Product: [WebTools] JSDT Reporter: Chris Jaun <cmjaun>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 Flags: thatnitind: review+
Version: 3.2.5   
Target Milestone: 3.2.5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Chris Jaun CLA 2011-07-01 15:28:41 EDT
The constant value of the FieldReference needs to be set to NotAConstant if all cases if the field is a "prototype" value.

If it doesn't it can lead to NPE's down the road if that field is used in a binary expression that tries to read the constant value.
Comment 1 Chris Jaun CLA 2011-07-01 15:30:13 EDT
Created attachment 198984 [details]
patch
Comment 2 Chris Jaun CLA 2011-07-01 15:36:20 EDT
Checked into 3.2.5 and HEAD.
Comment 3 Nitin Dahyabhai CLA 2011-07-11 09:47:50 EDT
Any issues possible with this.resolvedType not being set before some of the same method's returns?