What steps will reproduce the problem?
1. Have a class A that maps to both B and BSuper where B is a subclass of BSuper
2. call lookupConcreteDestinationType with destination B
3. depending on set iteration order, B or BSuper is returned
What is the expected output? What do you see instead?
I would expect it to return the tightest match, rather than the first that is
assignable.
What version of the product are you using? On what operating system?
1.2.0 on Ubuntu with Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Please provide any additional information below.
Attached a failing test, the troublesome code is here
for (final Type<?> type : destinationSet) {
if (destinationType.isAssignableFrom(type) && ClassUtil.isConcrete(type)) {
return (Type<? extends D>) type;
}
}
if destinationSet has multiple types that are assignable, it should pick the
one that is the tightest fit, rather than the first one that matches
Original issue reported on code.google.com by ransombr...@gmail.com on 7 Jun 2012 at 6:59
Original issue reported on code.google.com by
ransombr...@gmail.com
on 7 Jun 2012 at 6:59Attachments: