| Summary: | "assert" triggers a warning about null when it shouldn't | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dominik Stadler <dominik.stadler> |
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> |
| Status: | VERIFIED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | srikanth_sankaran |
| Version: | 3.7 | ||
| Target Milestone: | 3.6 M6 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
This is intended behaviour and we dont want to change this. See also bug 198044 for detailed discussions on the same. *** This bug has been marked as a duplicate of bug 173725 *** Verified for 3.6.1 RC2 Verified for 3.7 M2 |
Build Identifier: 3.6.0 The following piece of code reports a warning about null-access because it thinks "assert" always does the null-check. However if the code is run without "-ea" the null-check will be necessary. public void testNullWarning(String param) { assert param != null; if (param == null) { System.out.println(param); } } Reproducible: Always