Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-04-20 14:41:26 -0400
committerIgor Fedorenko2011-04-20 14:41:26 -0400
commitc7b31bae8fd0b8a11fe0acba9ada8bbf426fd689 (patch)
tree0d46d7b64f48d9fdcca96f81b39209841b90330a
parent40d3424ae941113e36a054b719d0fe1fef5359e0 (diff)
downloadm2e-core-c7b31bae8fd0b8a11fe0acba9ada8bbf426fd689.tar.gz
m2e-core-c7b31bae8fd0b8a11fe0acba9ada8bbf426fd689.tar.xz
m2e-core-c7b31bae8fd0b8a11fe0acba9ada8bbf426fd689.zip
NPE when showing project selection dialog with closed/missing projects
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java
index d9b94f1a..a03fc676 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/UpdateDepenciesDialog.java
@@ -11,6 +11,7 @@
package org.eclipse.m2e.core.ui.internal.dialogs;
import java.io.File;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -263,8 +264,11 @@ public class UpdateDepenciesDialog extends TitleAreaDialog {
@SuppressWarnings("unchecked")
private Collection<IProject> getMavenCodebases() {
projectPaths = new LinkedList<String>();
- for (IMavenProjectFacade facade : MavenPlugin.getMavenProjectRegistry().getProjects()) {
- projectPaths.add(new File(facade.getProject().getLocationURI()).toString());
+ for(IMavenProjectFacade facade : MavenPlugin.getMavenProjectRegistry().getProjects()) {
+ URI locationURI = facade.getProject().getLocationURI();
+ if(locationURI != null) {
+ projectPaths.add(new File(locationURI).toString());
+ }
}
Collections.sort(projectPaths);

Back to the top