IDEA-119463 NPE at org.jetbrains.idea.maven.wizards.MavenModuleBuilder.findPotentialParentProject

This commit is contained in:
Sergey Evdokimov
2014-01-16 17:10:47 +04:00
parent a54f6af0d6
commit 3df1ffd726
@@ -132,7 +132,10 @@ public class MavenModuleBuilder extends ModuleBuilder implements SourcePathsBuil
public MavenProject findPotentialParentProject(Project project) {
if (!MavenProjectsManager.getInstance(project).isMavenizedProject()) return null;
File parentDir = new File(getContentEntryPath()).getParentFile();
String contentEntryPath = getContentEntryPath();
if (contentEntryPath == null) return null;
File parentDir = new File(contentEntryPath).getParentFile();
if (parentDir == null) return null;
VirtualFile parentPom = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(new File(parentDir, "pom.xml"));
if (parentPom == null) return null;