Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469356: False indication of a possible NullReferenceException

$
0
0
Reporter Maria Pleskunina (Maria.Pleskunina) Maria Pleskunina (Maria.Pleskunina)
Created Apr 20, 2018 5:01:01 PM
Updated Apr 20, 2018 5:01:15 PM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Major
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2017.3.5, 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
In Method1() you can see that there is a condition that checks MyEvent for null, then goes a call to Method3() that does nothing, and then we envoke the event, MyEvent has a warning of a possible NullReferenceException on it, this is wrong since the condition was checked previously. If we remove the call to Method3() the warning will go away as it is shown in Method2().



Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>