Closed phutchin closed 9 years ago
Good spot - I completely agree.
Some background, the reason this happens is because the fixture is asked to make a SuperClass and this spawns off a request for SubType. The code to auto populate the properties looks at the request object, and it correctly ignores the second request (SubType) but the original request (SuperClass) is still in the stack and tries to populate it.
I'm overriding the behavior for a class, to use a particular extension of that class, and want to omit calling any setters, (as they need unresolvable objects). However to make the OmitAutoPropertyCustomisation work, I need to declare it for both the super class and the sub class. If I use just one or the other, then the setter (declared on the super class) is still called. To make it work I end up having to do this:
It seems counter intuitive to me, I'd expect to be able to just use
new OmitAutoPropertyCustomisation(SuperClass.class)