Merge pull request #52 from sblackshear/master

Check class of parent variable directly rather than using instanceof che...
This commit is contained in:
Manu Sridharan 2014-05-20 12:26:17 -07:00
commit 931030ddde
1 changed files with 5 additions and 1 deletions

View File

@ -125,7 +125,11 @@ public class BypassMethodTargetSelector implements MethodTargetSelector {
// we want to generate a NoOpSummary for this method.
return findOrCreateSyntheticMethod(site.getDeclaredTarget(), site.isStatic());
}
if (parent instanceof ClassHierarchyMethodTargetSelector) {
// 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;
}