Skip to content

Commit

Permalink
[java] fix null issue in deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jan 15, 2023
1 parent 85893f5 commit 796235d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/src/org/openqa/selenium/chrome/ChromeDriverService.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ public static ChromeDriverService createDefaultService() {
*/
@Deprecated
public static ChromeDriverService createServiceWithConfig(ChromeOptions options) {
ChromeDriverLogLevel oldLevel = options.getLogLevel();
ChromiumDriverLogLevel level = (oldLevel == null) ? null : ChromiumDriverLogLevel.fromString(oldLevel.toString());
return new Builder()
.withLogLevel(ChromiumDriverLogLevel.fromString(options.getLogLevel().toString()))
.withLogLevel(level)
.build();
}

Expand Down

0 comments on commit 796235d

Please sign in to comment.