Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2015-08-18 15:53:28 -0400
committerFred Bricon2015-08-18 15:54:04 -0400
commit0cf9ec6d67cb15d5844e040a561d16639a280739 (patch)
tree43eb727021d9205065b536b77863df647c1d32cd /org.eclipse.m2e.core
parent087dcbb521fb6ee7ce603fd971e532c399a61df6 (diff)
downloadm2e-core-0cf9ec6d67cb15d5844e040a561d16639a280739.tar.gz
m2e-core-0cf9ec6d67cb15d5844e040a561d16639a280739.tar.xz
m2e-core-0cf9ec6d67cb15d5844e040a561d16639a280739.zip
471840 : fix configurator isRoot computation
Change-Id: Ic9bfb3afc45e22a0b0e3cbb2c69e35566db56fa7 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java
index 33a6b1b7..7e6043b7 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java
@@ -89,7 +89,8 @@ public class ProjectConfigurationElementSorter {
}
}
- if(runsAfter != null) {
+ if(runsAfter != null && runsAfter.length > 0) {
+ allSecondaryConfigurators.add(key);
for(String id : runsAfter) {
id = id.trim();
if(id.isEmpty()) {
@@ -165,7 +166,7 @@ public class ProjectConfigurationElementSorter {
for(String id : sortedExecutions) {
//Remove incomplete metadata
- if(_incompletes.containsKey(id) || _missingIds.contains(id)) {
+ if(!configuratorIds.contains(id) || _incompletes.containsKey(id) || _missingIds.contains(id)) {
continue;
}
@@ -267,13 +268,12 @@ public class ProjectConfigurationElementSorter {
* @return true if a configurator id is a root configurator (i.e. has no parent)
*/
public boolean isRootConfigurator(String configuratorId) {
- if(configuratorId == null) {
+ if(configuratorId == null || incompleteConfigurators.containsKey(configuratorId)) {
return false;
}
- boolean isRoot = primaryConfigurators.containsKey(configuratorId);
- if(!isRoot) {
- isRoot = !allSecondaryConfigurators.contains(configuratorId);
- }
+ boolean isPrimary = primaryConfigurators.containsKey(configuratorId);
+ boolean isSecondary = allSecondaryConfigurators.contains(configuratorId);
+ boolean isRoot = (isPrimary && (primaryConfigurators.size() == 1 || !isSecondary)) || (!isPrimary && !isSecondary);
return isRoot;
}

Back to the top