| Summary: | [compiler][null][correlation] warns "may be null" within block that would be unreachable if arg was null | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Grant Gayed <grant_gayed> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P5 | CC: | feles, nilskp+eclipse, stephan.herrmann, vlsergey |
| Version: | 3.2 | Keywords: | helpwanted |
| Target Milestone: | 4.7 M1 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
This is a slightly simpler case than bug 134933. This calls for variables correlation, which is not in 3.2 scope. *** Bug 150123 has been marked as a duplicate of this bug. *** *** Bug 151725 has been marked as a duplicate of this bug. *** *** Bug 155043 has been marked as a duplicate of this bug. *** Reopening as P5 (since RESOLVED LATER is deprecated). Bulk closing all compiler bugs tagged [null][correlation], because we have no plans to add such a feature: it would be a tremendous implementation effort, beyond our current man power, and may be impossible to achieve within the desired performance bounds. If s.o. has a viable strategy or even implementation for such a feature, I'm all ears. Verified for 4.7 M1. I created a new umbrella RFE outlining what would be needed to address this issue. *** This bug has been marked as a duplicate of bug 538421 *** |
snippet: public static void main(String[] args) { String abc = System.currentTimeMillis() % 2 == 0 ? "abc" : null; boolean doit = abc != null; if (doit) { System.out.println(abc.length()); // <-- cannnot get here if abc==null } }