I also wondered about combining the nested ifs but I think it's getting a bit more complicated.

```
boolean isBestCandidate = (bestCandidate == null && c.isAssignableFrom(targetClass)) || bestCandidate.isAssignableFrom(c);
```
What if *bestCandidate == null* resolves to true and *c.isAssignableFrom(targetClass)* resolves to false - it's not exactly equivalent.

But I agree it got a bit hairy. I'll try to break it a bit.