From 640cddbd91d4ea5ec4da2266c9d96c516eddac89 Mon Sep 17 00:00:00 2001 From: eeichinger Date: Sun, 26 Jul 2009 16:05:31 +0000 Subject: [PATCH] polishing renamed BreakingChanges-1.2.txt to BreakingChanges-1.3.txt --- ...kingChanges-1.2.txt => BreakingChanges-1.3.txt | 0 .../Factory/Support/AbstractObjectFactory.cs | 15 ++++----------- 2 files changed, 4 insertions(+), 11 deletions(-) rename BreakingChanges-1.2.txt => BreakingChanges-1.3.txt (100%) diff --git a/BreakingChanges-1.2.txt b/BreakingChanges-1.3.txt similarity index 100% rename from BreakingChanges-1.2.txt rename to BreakingChanges-1.3.txt diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs index 654c1422..0eeda5de 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs @@ -1714,14 +1714,11 @@ namespace Spring.Objects.Factory.Support } /// - /// Does this object factory contain an object with the given name? + /// Does this object factory or one of its parent factories contain an object with the given name? /// /// - /// This method does not (and it should not) check if the specified - /// object exists in one of the parent object factories. If it did, - /// message sources and event registries within application context - /// hierarchy would have circular references, which would cause stack - /// overflows during message lookup, for example. (A. Seovic) + /// This method scans the object factory hierarchy starting with the current factory instance upwards. + /// Use if you want to explicitely check just this object factory instance. /// /// . public bool ContainsObject(string name) @@ -1745,11 +1742,7 @@ namespace Spring.Objects.Factory.Support { string objectName = TransformedObjectName(name); // check if object actually exists in this object factory... - bool isInSingletonCache = false; - lock (singletonCache) - { - isInSingletonCache = singletonCache.Contains(objectName); - } + bool isInSingletonCache = ContainsSingleton(objectName); if (isInSingletonCache || ContainsObjectDefinition(objectName)) { // if found, gather aliases...