| Summary: | [model] JavaElement.newNotPresentException exceptions caused by use of IJavaScriptProject#findType | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Ian Tewksbury <itewksbu> | ||||||
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cmjaun | ||||||
| Version: | 3.2 | Flags: | cmjaun:
review+
thatnitind: review+ |
||||||
| Target Milestone: | 3.2.1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Ian is submitting an updated patch with a few minor updates. I approve. Created attachment 171562 [details]
Fix Patch - Update 1
Added null safety.
Fix checked into 3.2.1 verified in WTP 3.2.1 |
Created attachment 171541 [details] Fix Patch The problem with IJavaScriptProject#findType is that it returns the first type to match the given FQN but that type may not actully be the one a caller is looking for. Then if the caller asks for a field they are expecting on the type but its the wrong type a org.eclipse.wst.jsdt.internal.core.JavaElement.newNotPresentException is thrown. Attached patch changes a couple of these cases I have found to use the #findTypes method to avoid this exception.