fix potential bugs, detected by findbugs and pmd

This commit is contained in:
Sebastian Sdorra
2011-12-24 15:45:03 +01:00
parent ef16a8bd9b
commit a1d031e587
4 changed files with 11 additions and 8 deletions

View File

@@ -62,9 +62,10 @@ public class ScmLogFilePropertyDefiner extends PropertyDefinerBase
File logDirectory = new File(SCMContext.getContext().getBaseDirectory(),
LOG_DIRECTORY);
if (!logDirectory.exists())
if (!logDirectory.exists() &&!logDirectory.mkdirs())
{
logDirectory.mkdirs();
throw new ConfigurationException(
"could not create log directory ".concat(logDirectory.getPath()));
}
this.logDirectoryPath = logDirectory.getAbsolutePath();