Skip to content

Commit

Permalink
Explain why ExpectedCondition continues to extend guava's Function
Browse files Browse the repository at this point in the history
It's to avoid having users rewrite code. We're so
dependent on the library it doesn't make sense to
remove a single call site.
  • Loading branch information
shs96c committed Apr 25, 2017
1 parent 302e87f commit a709f45
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@
*
* @param <T> The return type
*/
// NB: this originally extended Guava's Function interface since Java didn't have one. To avoid code
// such as "com.google.common.base.Function condition = ExpectedConditions.elementFound(By);"
// breaking at compile time, we continue to extend Guava's Function interface.
public interface ExpectedCondition<T> extends Function<WebDriver, T> {}

0 comments on commit a709f45

Please sign in to comment.