fix NPE when parsing custom args

This commit is contained in:
Martin Lippert
2019-03-11 10:43:03 +01:00
parent 65aa2ef69f
commit ad29ce3445

View File

@@ -55,12 +55,14 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
private void addCustomJVMArgs(List<String> args) {
String customArgs = System.getProperty("boot.ls.custom.vmargs");
String prefix = "";
String[] separateArgs = customArgs.split(",-");
for (String arg : separateArgs) {
args.add(prefix + arg);
prefix = "-";
if (customArgs != null) {
String prefix = "";
String[] separateArgs = customArgs.split(",-");
for (String arg : separateArgs) {
args.add(prefix + arg);
prefix = "-";
}
}
}