| Summary: | [content assist] Member variable type lost after ?: assignment | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Ingo Rau <ingo.rau> | ||||
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> | ||||
| Status: | NEW --- | QA Contact: | Chris Jaun <cmjaun> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | vincent.tardif | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ingo Rau
Created attachment 204287 [details]
Test class
This bug also allows the compiler to accept a null assignment to a primitive type. (findbugs marks the line with the warning "Possible indirection of a null pointer"). Although a NullPointerException is thrown at execution.
Example code :
public class TestClass {
public static void main(String[] args) {
Object tmp = null;
double a = tmp == null ? null : 0.;
}
}
|