dean.ward
12-24-2006, 07:38 PM
Hi there,
Just a little something I've noticed while playing with Spring 1.1P3 - using a property like this for dependency injection:
private ISomeInterface something;
public ISomeInterface Something
{
private get { return something; }
set { contentGroupDL = value; }
}
(note the more restrictive getter) causes Spring to throw a NullReferenceException in Spring.Util.DynamicReflection.DynamicProperty.Gene rateGetValue (DyanmicProperty.cs, line 188). Removing the more restrictive getter, replacing it with a public version, or replacing the call in the method above to GetGetMethod() with GetGetMethod(true) does the trick.
Not investigated much further than that yet, but thought I'd give you guys a heads up anyhow.
Cheers,
Dean
Just a little something I've noticed while playing with Spring 1.1P3 - using a property like this for dependency injection:
private ISomeInterface something;
public ISomeInterface Something
{
private get { return something; }
set { contentGroupDL = value; }
}
(note the more restrictive getter) causes Spring to throw a NullReferenceException in Spring.Util.DynamicReflection.DynamicProperty.Gene rateGetValue (DyanmicProperty.cs, line 188). Removing the more restrictive getter, replacing it with a public version, or replacing the call in the method above to GetGetMethod() with GetGetMethod(true) does the trick.
Not investigated much further than that yet, but thought I'd give you guys a heads up anyhow.
Cheers,
Dean