@@ -1714,14 +1714,11 @@ public bool IsPrototype(string name)
1714
1714
}
1715
1715
1716
1716
/// <summary>
1717
- /// Does this object factory contain an object with the given name?
1717
+ /// Does this object factory or one of its parent factories contain an object with the given name?
1718
1718
/// </summary>
1719
1719
/// <remarks>
1720
- /// This method does not (and it should not) check if the specified
1721
- /// object exists in one of the parent object factories. If it did,
1722
- /// message sources and event registries within application context
1723
- /// hierarchy would have circular references, which would cause stack
1724
- /// overflows during message lookup, for example. (A. Seovic)
1720
+ /// This method scans the object factory hierarchy starting with the current factory instance upwards.
1721
+ /// Use <see cref="ContainsLocalObject"/> if you want to explicitely check just this object factory instance.
1725
1722
/// </remarks>
1726
1723
/// <see cref="Spring.Objects.Factory.IObjectFactory.ContainsObject"/>.
1727
1724
public bool ContainsObject ( string name )
@@ -1745,11 +1742,7 @@ public string[] GetAliases(string name)
1745
1742
{
1746
1743
string objectName = TransformedObjectName ( name ) ;
1747
1744
// check if object actually exists in this object factory...
1748
- bool isInSingletonCache = false ;
1749
- lock ( singletonCache )
1750
- {
1751
- isInSingletonCache = singletonCache . Contains ( objectName ) ;
1752
- }
1745
+ bool isInSingletonCache = ContainsSingleton ( objectName ) ;
1753
1746
if ( isInSingletonCache || ContainsObjectDefinition ( objectName ) )
1754
1747
{
1755
1748
// if found, gather aliases...
0 commit comments