Skip to content

Commit

Permalink
The augmenter should not add handlers for role interfaces the augment…
Browse files Browse the repository at this point in the history
…ed object

already implements.
  • Loading branch information
Jason Leyba committed Jul 11, 2013
1 parent e72789a commit facc014
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions java/client/src/org/openqa/selenium/remote/Augmenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ private CompoundHandler determineAugmentation(WebDriver driver,
continue;
}

handler.addCapabilityHander(augmenter.getDescribedInterface(),
augmenter.getImplementation(value));
Class<?> iface = augmenter.getDescribedInterface();
if (iface.isInstance(objectToAugment)) {
continue;
}

handler.addCapabilityHander(iface, augmenter.getImplementation(value));
}
return handler;
}
Expand Down

0 comments on commit facc014

Please sign in to comment.