Skip to content

Commit 6ce0aa7

Browse files
committed
Polish
Signed-off-by: BoykoAlex <alex.boyko@broadcom.com>
1 parent e531b17 commit 6ce0aa7

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/VSCodeBuildCommandProvider.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ public Command executeMavenGoal(IJavaProject project, String goal) {
2525
Command cmd = new Command();
2626
cmd.setCommand("maven.goal.custom");
2727
cmd.setTitle("Execute Maven Goal");
28-
List<Object> args = new ArrayList<>(List.of(
29-
Paths.get(project.getProjectBuild().getBuildFile()).toFile().toString(), goal));
28+
List<Object> args = new ArrayList<>(3);
29+
args.add(Paths.get(project.getProjectBuild().getBuildFile()).toFile().toString());
30+
args.add(goal);
3031
Map<String, String> env = BuildCommandProvider.buildEnv(project);
3132
if (env != null && !env.isEmpty()) {
3233
args.add(env);
@@ -40,8 +41,9 @@ public Command executeGradleBuild(IJavaProject project, String command) {
4041
Command cmd = new Command();
4142
cmd.setCommand("gradle.runBuild");
4243
cmd.setTitle("Execute Gradle Build");
43-
List<Object> args = new ArrayList<>(List.of(
44-
Paths.get(project.getProjectBuild().getBuildFile()).toFile().toString(), command));
44+
List<Object> args = new ArrayList<>(3);
45+
args.add(Paths.get(project.getProjectBuild().getBuildFile()).toFile().toString());
46+
args.add(command);
4547
Map<String, String> env = BuildCommandProvider.buildEnv(project);
4648
if (env != null && !env.isEmpty()) {
4749
args.add(env);

0 commit comments

Comments
 (0)