adding comment explaining why instanceof check was replaced

This commit is contained in:
Sam Blackshear 2014-05-20 11:50:40 -06:00
parent fd47590634
commit 0fba08e581
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ public class BypassMethodTargetSelector implements MethodTargetSelector {
return findOrCreateSyntheticMethod(site.getDeclaredTarget(), site.isStatic());
}
// not using if (instanceof ClassHierarchyMethodTargetSelector) because
// we want to make sure that getCalleeTarget() is still called if
// parent is a subclass of ClassHierarchyMethodTargetSelector
if (parent.getClass() == ClassHierarchyMethodTargetSelector.class) {
// already checked this case and decided not to bypass
return chaTarget;