This commit is contained in:
Eugene Zhuravlev
2009-11-17 13:49:58 +03:00
parent 2e4f5d0bad
commit 944a7bedea
2 changed files with 3 additions and 3 deletions
@@ -142,7 +142,7 @@ public class CompileContextImpl extends UserDataHolderBase implements CompileCon
final Module module = getModuleByFile(file);
if (module != null) {
final String procGenRoot = CompilerPaths.getAnnotationProcessorsGenerationPath(module);
if (VfsUtil.isAncestor(new File(procGenRoot), new File(file.getPath()), true)) {
if (procGenRoot != null && VfsUtil.isAncestor(new File(procGenRoot), new File(file.getPath()), true)) {
return true;
}
}
@@ -116,8 +116,8 @@ public class AnnotationProcessingCompiler implements TranslatingCompiler{
return true;
}
final String path = CompilerPaths.getAnnotationProcessorsGenerationPath(module);
final VirtualFile generationDir = LocalFileSystem.getInstance().findFileByPath(path);
if (VfsUtil.isAncestor(generationDir, file, false)) {
final VirtualFile generationDir = path != null? LocalFileSystem.getInstance().findFileByPath(path) : null;
if (generationDir != null && VfsUtil.isAncestor(generationDir, file, false)) {
return true;
}
}