Skip to content

Commit

Permalink
[java] Fixing legacy Firefox driver initialization code to avoid refl…
Browse files Browse the repository at this point in the history
…ection errors.
  • Loading branch information
barancev committed Feb 12, 2019
1 parent c5c18d3 commit 9aca1dc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ static XpiDriverService createDefaultService(Capabilities caps) {
} catch (IOException ex) {
throw new RuntimeException(ex);
}},
((FirefoxOptions) caps)::getProfile,
// Don't believe IDEA, this lambda can't be replaced with a method reference!
() -> ((FirefoxOptions) caps).getProfile(),
() -> (FirefoxProfile) ((Map<String, Object>) caps.getCapability(FIREFOX_OPTIONS)).get("profile"),
() -> { try {
return FirefoxProfile.fromJson(
Expand Down

0 comments on commit 9aca1dc

Please sign in to comment.