Fix InvocationTargetException.

Reported by: George Gousios
This commit is contained in:
Diomidis Spinellis 2007-03-26 07:04:06 +00:00
parent d852aea76f
commit 6839e3c683
2 changed files with 4 additions and 2 deletions

View File

@ -986,7 +986,8 @@ class ClassGraph {
else
file = new File(opt.outputFileName);
// make sure the output directory are there, otherwise create them
if(!file.getParentFile().exists())
if (file.getParentFile() != null
&& !file.getParentFile().exists())
file.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(file);

View File

@ -986,7 +986,8 @@ class ClassGraph {
else
file = new File(opt.outputFileName);
// make sure the output directory are there, otherwise create them
if(!file.getParentFile().exists())
if (file.getParentFile() != null
&& !file.getParentFile().exists())
file.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(file);