Skip to content

Commit

Permalink
Fixed format
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Nioche <[email protected]>
  • Loading branch information
jnioche authored and rzo1 committed Oct 21, 2024
1 parent b40f9db commit 731189b
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.commons.lang.StringUtils;
import org.apache.storm.Config;
import org.apache.storm.utils.MutableInt;
Expand Down Expand Up @@ -106,7 +105,7 @@ public void configure(final Config conf) {
final Map<String, String> env = new HashMap<>();

// no need to download if we are connecting to a remote instance
if (StringUtils.isNotBlank(CDP_URL) || StringUtils.isNotBlank(REMOTE_WS)){
if (StringUtils.isNotBlank(CDP_URL) || StringUtils.isNotBlank(REMOTE_WS)) {
skipDownloads = true;
}

Expand All @@ -118,13 +117,12 @@ public void configure(final Config conf) {
creationOptions.setEnv(env);

BrowserType btype = Playwright.create(creationOptions).chromium();
if (StringUtils.isNotBlank(CDP_URL) && StringUtils.isNotBlank(REMOTE_WS)){
throw new RuntimeException("Can't specify both cdp.url and remote.ws in the configuration");
}
else if (StringUtils.isNotBlank(CDP_URL)) {
if (StringUtils.isNotBlank(CDP_URL) && StringUtils.isNotBlank(REMOTE_WS)) {
throw new RuntimeException(
"Can't specify both cdp.url and remote.ws in the configuration");
} else if (StringUtils.isNotBlank(CDP_URL)) {
browser = btype.connectOverCDP(CDP_URL);
}
else if (StringUtils.isNotBlank(REMOTE_WS)) {
} else if (StringUtils.isNotBlank(REMOTE_WS)) {
browser = btype.connect(REMOTE_WS);
} else {
browser = btype.launch();
Expand Down

0 comments on commit 731189b

Please sign in to comment.