mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NPEs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user