From 08ac72f5f02882ff74c31182a5e3d647eb0a68e5 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 26 Dec 2019 11:57:32 +0100 Subject: [PATCH] Fix build failure --- .../springframework/boot/cli/command/core/HintCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HintCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HintCommand.java index dd9f65b224..08ce4baa99 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HintCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/core/HintCommand.java @@ -17,7 +17,6 @@ package org.springframework.boot.cli.command.core; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -49,7 +48,9 @@ public class HintCommand extends AbstractCommand { try { int index = (args.length != 0) ? Integer.parseInt(args[0]) - 1 : 0; List arguments = new ArrayList<>(args.length); - arguments.addAll(Arrays.asList(args).subList(2, args.length)); + for (int i = 2; i < args.length; i++) { + arguments.add(args[i]); + } String starting = ""; if (index < arguments.size()) { starting = arguments.remove(index);