Skip to content

Commit

Permalink
Move the overloads of CommandLine#concat() next to each other.
Browse files Browse the repository at this point in the history
RELNOTES: None.
PiperOrigin-RevId: 217836884
  • Loading branch information
lberki authored and Copybara-Service committed Oct 19, 2018
1 parent 13081be commit de5e968
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@ public Iterable<String> arguments(ArtifactExpander artifactExpander)
}
}

/**
* Returns a {@link CommandLine} that is constructed by prepending the {@code executableArgs} to
* {@code commandLine}.
*/
public static CommandLine concat(
final ImmutableList<String> executableArgs, final CommandLine commandLine) {
if (executableArgs.isEmpty()) {
return commandLine;
}
return new PrefixedCommandLine(executableArgs, commandLine);
}

@AutoCodec
@VisibleForSerialization
static class SuffixedCommandLine extends CommandLine {
Expand All @@ -140,6 +128,18 @@ public Iterable<String> arguments(ArtifactExpander artifactExpander)
}
}

/**
* Returns a {@link CommandLine} that is constructed by prepending the {@code executableArgs} to
* {@code commandLine}.
*/
public static CommandLine concat(
final ImmutableList<String> executableArgs, final CommandLine commandLine) {
if (executableArgs.isEmpty()) {
return commandLine;
}
return new PrefixedCommandLine(executableArgs, commandLine);
}

/**
* Returns a {@link CommandLine} that is constructed by appending the {@code args} to {@code
* commandLine}.
Expand Down

0 comments on commit de5e968

Please sign in to comment.