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

This commit is contained in:
Steve Bohlen
2015-02-01 20:54:31 -05:00
parent 1f132cda61
commit 8246883aec

View File

@@ -67,13 +67,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)