NPE when using AbstractDependencyInjecttionSpringContextTests and Autowire within test class

This commit is contained in:
Thomas Trageser
2013-01-27 22:34:56 +00:00
parent 095c5efe34
commit e09235a449

View File

@@ -369,9 +369,13 @@ namespace Spring.Objects.Factory.Attributes
/// </summary>
private static void RegisterDependentObjects(string objectName, IList autowiredObjectNames)
{
if (objectName == null) return;
if (objectName == null)
return;
var objectDefinition = _objectFactory.GetObjectDefinition(objectName) as RootObjectDefinition;
if (objectDefinition == null)
return;
IList<string> dependsOn = new List<string>(objectDefinition.DependsOn);
foreach (var name in autowiredObjectNames)
{