[java] Fixing legacy Firefox driver initialization code to avoid reflection errors.
@@ -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(
