Issue #2191 - JPMS Support.

NPE fixes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-09-28 10:22:51 +02:00
parent 27e7b3287a
commit 02eccd55ae
1 changed files with 2 additions and 2 deletions

View File

@ -690,7 +690,7 @@ public class StartArgs
Map<Boolean, List<File>> dirsAndFiles = StreamSupport.stream(classpath.spliterator(), false)
.collect(Collectors.groupingBy(File::isDirectory));
List<File> files = dirsAndFiles.get(false);
if (!files.isEmpty())
if (files != null && !files.isEmpty())
{
cmd.addRawArg("--module-path");
String modules = files.stream()
@ -699,7 +699,7 @@ public class StartArgs
cmd.addRawArg(modules);
}
List<File> dirs = dirsAndFiles.get(true);
if (!dirs.isEmpty())
if (dirs != null && !dirs.isEmpty())
{
cmd.addRawArg("--class-path");
String directories = dirs.stream()