| One more thought on classes vs. interfaces: Assume we have classes A and B extends A as well as X (unrelated to A or B). If you now see return type A you have to expect to get A, B or any other subclass of A on invocation - but never X. Thus you can safely omit the ValueExtractor for X. However things are different if X is an interface: Then B or even an unknown C extends B implements X might implement X. So omitting the ValueExtractor for X (or any other interface) when seeing a (non-final) class (or interface) not (yet) implementing X/the interface may lead to the above symptom? |