diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs index 30c25c6c..a2d570f5 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs @@ -308,6 +308,7 @@ namespace Spring.Objects.Factory.Support // try all matching methods to see if they match the constructor arguments... foreach(MethodInfo factoryMethod in factoryMethods) { + Type[] paramTypes = new Type[] { }; #endif if (arguments == null || arguments.Length == 0) { diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs index 99aedc10..9ff51a3f 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs @@ -1111,9 +1111,14 @@ namespace Spring.Objects.Factory.Xml ITestObject kerry = (ITestObject) xof.GetObject("spouse"); ITestObject kerry2 = (ITestObject)xof.GetObject("spouse2"); ArrayCtorDependencyObject rod7 = (ArrayCtorDependencyObject) xof.GetObject("rod7"); +#if NET_1_0 || NET_1_1 + // Lack of OrderedDictionary means we can't predict the ordering of the autowiring. + Assert.IsNotNull(rod7.Spouse1); + Assert.IsNotNull(rod7.Spouse2); +#else Assert.AreEqual(kerry, rod7.Spouse1); Assert.AreEqual(kerry2, rod7.Spouse2); - +#endif } public void AutowireWithParent()