Fix the NullPointerException when pathname does not name a parent.

This commit is contained in:
scaventz
2021-03-06 06:16:10 +08:00
committed by Alexander Udalov
parent 1c1492da3d
commit 81a495b494
@@ -116,7 +116,9 @@ public class CompileEnvironmentUtil {
FileOutputStream outputStream = null;
try {
// we should try to create the output dir first
jarPath.getParentFile().mkdirs();
if (jarPath.getParentFile() != null) {
jarPath.getParentFile().mkdirs();
}
outputStream = new FileOutputStream(jarPath);
doWriteToJar(outputFiles, outputStream, mainClass, jarRuntime, noReflect, resetJarTimestamps);
outputStream.close();