re-order logic flow to fix failing test case where serviceType arg is null

This commit is contained in:
Steve Bohlen
2015-02-01 21:23:59 -05:00
parent 8246883aec
commit 8eda2d42c4

View File

@@ -70,13 +70,9 @@ namespace Spring.Web.Mvc
/// <returns>The requested service or object.</returns>
public object GetService(Type serviceType)
{
if (serviceType.FullName.StartsWith(IgnoreViewNamespace))
{
return null;
}
object service = null;
if (serviceType != null)
if (serviceType != null && !serviceType.FullName.StartsWith(IgnoreViewNamespace))
{
var services = ApplicationContext.GetObjectsOfType(serviceType);
if (services.Count > 0)