This commit is contained in:
Stephane Nicoll
2019-12-26 10:42:40 +01:00
parent 1e38dd5531
commit 2c1e81adf0
24 changed files with 65 additions and 78 deletions

View File

@@ -18,7 +18,6 @@ package org.springframework.boot.cli.command.archive;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -175,7 +174,7 @@ abstract class ArchiveCommand extends OptionParsingCommand {
}
private void writeJar(File file, Class<?>[] compiledClasses, List<MatchedResource> classpathEntries,
List<URL> dependencies) throws FileNotFoundException, IOException, URISyntaxException {
List<URL> dependencies) throws IOException, URISyntaxException {
final List<Library> libraries;
try (JarWriter writer = new JarWriter(file)) {
addManifest(writer, compiledClasses);

View File

@@ -17,6 +17,7 @@
package org.springframework.boot.cli.command.core;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -48,9 +49,7 @@ public class HintCommand extends AbstractCommand {
try {
int index = (args.length != 0) ? Integer.parseInt(args[0]) - 1 : 0;
List<String> arguments = new ArrayList<>(args.length);
for (int i = 2; i < args.length; i++) {
arguments.add(args[i]);
}
arguments.addAll(Arrays.asList(args).subList(2, args.length));
String starting = "";
if (index < arguments.size()) {
starting = arguments.remove(index);