diff options
author | Igor Fedorenko | 2013-10-15 16:47:30 +0000 |
---|---|---|
committer | Igor Fedorenko | 2013-10-15 16:47:30 +0000 |
commit | 9f7b48b6f14ec322e06948dcd2198bee60e29d05 (patch) | |
tree | aa5c021273708b209c8864c662216d5af8782783 | |
parent | 88c6ce38e4b60ee6e08ab7cd21312b0d31bc5b52 (diff) | |
download | m2e-core-9f7b48b6f14ec322e06948dcd2198bee60e29d05.tar.gz m2e-core-9f7b48b6f14ec322e06948dcd2198bee60e29d05.tar.xz m2e-core-9f7b48b6f14ec322e06948dcd2198bee60e29d05.zip |
fixed NPE in import wizard when location is hidden
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r-- | org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java index f5c23831..000c2454 100644 --- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java +++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java @@ -502,8 +502,8 @@ public class MavenImportWizardPage extends AbstractMavenWizardPage { } // check if imported project(s) are nested inside existing workspace project - String rootDirectory = rootDirectoryCombo.getText().trim(); - if(rootDirectory.length() > 0) { + String rootDirectory = rootDirectoryCombo != null ? rootDirectoryCombo.getText().trim() : null; + if(rootDirectory != null && rootDirectory.length() > 0) { Set<IWorkingSet> workingSets = new HashSet<IWorkingSet>(); for(IContainer container : workspaceRoot.findContainersForLocationURI(new File(rootDirectory).toURI())) { workingSets.addAll(WorkingSets.getAssignedWorkingSets(container.getProject())); |