| Summary: | [compiler][null] missed "Potential Nullpointer Access" on mutable method argument | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | kurt <kurt2002> |
| Component: | Core | Assignee: | Stephan Herrmann <stephan.herrmann> |
| Status: | CLOSED MOVED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | amj87.iitr, kurt2002, stephan.herrmann |
| Version: | 3.8 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| URL: | https://github.com/eclipse-jdt/eclipse.jdt.core/pull/297 | ||
| Whiteboard: | |||
The null status for s is unknown in the first method while it is pot. null in the second. Strange. Should be fixed post-Juno since this is a pre-existing problem. For your information - bug is still present in Eclipse 4.5M2: Version: Mars (4.5) Build id: I20140918-0330 This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. Still happens on the master . This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build Identifier: Version: 3.8.0 Build id: I20120525-1400 In first method the PNA on s.split() is not reported (detected). In second method it is detected. public class PNA { void missedPNA(String s) { if (s != null) s = "1,2"; final String[] sa = s.split(","); for (final String ss : sa) System.out.println(ss); } void detectedPNA(final String ps) { String s = ps; if (s != null) s = "1,2"; final String[] sa = s.split(","); for (final String ss : sa) System.out.println(ss); } } Reproducible: Always