Reporter | 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
;
}
// 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.
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.