Skip to content

Commit

Permalink
[java] Refactoring, no functional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed May 2, 2019
1 parent 7904d5c commit 2cba710
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions java/client/test/org/openqa/selenium/build/BuckBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.os.CommandLine;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
Expand All @@ -45,7 +44,7 @@ public BuckBuild of(String target) {
return this;
}

public Path go(boolean inDevMode) throws IOException {
public Path go(boolean inDevMode) {
Path projectRoot = InProject.locate("Rakefile").getParent();

if (!inDevMode) {
Expand Down Expand Up @@ -78,13 +77,13 @@ public Path go(boolean inDevMode) throws IOException {
return findOutput(projectRoot);
}

private Path findOutput(Path projectRoot) throws IOException {
private Path findOutput(Path projectRoot) {
ImmutableList.Builder<String> builder = ImmutableList.builder();
findBuck(projectRoot, builder);
builder.add("targets", "--show-full-output", "--config", "color.ui=never", target);

ImmutableList<String> command = builder.build();
CommandLine commandLine = new CommandLine(command.toArray(new String[command.size()]));
CommandLine commandLine = new CommandLine(command.toArray(new String[0]));
commandLine.setWorkingDirectory(projectRoot.toAbsolutePath().toString());
commandLine.copyOutputTo(System.err);
commandLine.execute();
Expand Down Expand Up @@ -120,7 +119,7 @@ private Path findOutput(Path projectRoot) throws IOException {
return output;
}

private void findBuck(Path projectRoot, ImmutableList.Builder<String> builder) throws IOException {
private void findBuck(Path projectRoot, ImmutableList.Builder<String> builder) {
Path buckw = projectRoot.resolve(Platform.getCurrent().is(WINDOWS) ? "buckw.bat" : "buckw");

assertTrue("Unable to find buckw: " + buckw, Files.exists(buckw));
Expand Down

0 comments on commit 2cba710

Please sign in to comment.