diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs index 456640b0..99887898 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs @@ -212,25 +212,7 @@ namespace Spring.Objects.Factory public static IList ObjectNamesForTypeIncludingAncestors( IListableObjectFactory factory, Type type) { - return factory.GetObjectNamesForType(type); - - List result = new List(); - result.AddRange(factory.GetObjectNamesForType(type)); - IListableObjectFactory pof = GetParentListableObjectFactoryIfAny(factory); - if (pof != null) - { - IHierarchicalObjectFactory hof = (IHierarchicalObjectFactory)factory; - IList parentsResult = ObjectNamesForTypeIncludingAncestors(pof, type); - foreach (string objectName in parentsResult) - { - if (!result.Contains(objectName) && !hof.ContainsLocalObject(objectName)) - { - result.Add(objectName); - } - } - } - return result; } ///