Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-04-21 13:53:37 +0000
committerIgor Fedorenko2011-04-21 14:16:02 +0000
commit02d54276dd0bf9f477801cccfd452e15dc840106 (patch)
tree1cb9a40a4469e49b2985f1a26846f266390aceec /org.eclipse.m2e.core
parent9790d5d92a1722d284263b90221f5a06b246a4a6 (diff)
downloadm2e-core-02d54276dd0bf9f477801cccfd452e15dc840106.tar.gz
m2e-core-02d54276dd0bf9f477801cccfd452e15dc840106.tar.xz
m2e-core-02d54276dd0bf9f477801cccfd452e15dc840106.zip
343526 - NPE in ProjectRegistryManager after workspace restart
Facade's mavenProject instance can be null when updating dependent projects not directly listed in original update request. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
index c1176704..e096f795 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
@@ -432,8 +432,13 @@ public class ProjectRegistryManager {
newFacade = newState.getProjectFacade(pom);
}
if(newFacade != null) {
- // loose any session state
- newFacade = new MavenProjectFacade(newFacade);
+ if(newFacade.getMavenProject() == null) {
+ // facade from workspace state that has not been refreshed yet
+ newFacade = readMavenProject(pom, context, newState, monitor);
+ } else {
+ // loose any session state
+ newFacade = new MavenProjectFacade(newFacade);
+ }
}
Set<Capability> capabilities = null;

Back to the top