| Summary: | [null] conditional with redundant condition yields weak error message | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||||
| Component: | Core | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | Olivier_Thomann | ||||||
| Version: | 3.7 | ||||||||
| Target Milestone: | 3.8 M2 | ||||||||
| Hardware: | Other | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Stephan Herrmann
Created attachment 201357 [details]
Test & fix under test
This patch includes one more test, where the problem is even more
relevant: by swapping "==" for "!=" we get a warning where analysis
should indeed by silent.
The patch fixes the issue by ConditionalExpression.computeNullStatus
check the reachmodes of both branches, dropping the one that is not
reachable.
NullReferenceTests pass, more tests pending.
Created attachment 201437 [details]
Same patch with copyrights updated
All compiler and model tests passed with this patch.
Released in HEAD for 3.8M2. Verified for 3.8M2. |