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

RSRP-287974: "Expression is always null" generated when it shouldn't be

$
0
0
Reporter cliff vaughn (bbypowerdude) cliff vaughn (bbypowerdude)
Created Jan 24, 2012 7:53:43 PM
Updated Jan 24, 2012 11:44:00 PM
Resolved Jan 24, 2012 8:49:51 PM
Priority Normal
Type Unspecified
Fix versions No Fix versions
State Won't fix
Assignee Evgeny Pasynkov (pasynkov)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
Give the following class in an MVC project:

public class CustomControllerFactory : DefaultControllerFactory
{
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
if (requestContext == null)
{
throw new ArgumentNullException("requestContext");
}

if (controllerType == null)
{
// let the base handle 404 errors with proper culture information
                return base.GetControllerInstance(requestContext, controllerType)
;
}

// other code
}
}

"Expression is always null" is generated on the controllerType parameter in when calling "return base.GetController..."

The warning probably shouldn't be generated since we're just calling another method.

Using latest build.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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