Fix the NullPointerException when pathname does not name a parent.
This commit is contained in:
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();
|
||||
|
||||
Reference in New Issue
Block a user