Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-02-15 21:29:50 +0000
committerSusan Franklin2010-02-15 21:29:50 +0000
commit908e76effed9b094fff8f255f3b00750889d39f2 (patch)
treecb8c21202f09e7fb967c8ba8c43d659ab5d4e0b4 /bundles
parent14cdf6dd22112cb007067d32a3c25317bb63d20d (diff)
downloadrt.equinox.p2-908e76effed9b094fff8f255f3b00750889d39f2.tar.gz
rt.equinox.p2-908e76effed9b094fff8f255f3b00750889d39f2.tar.xz
rt.equinox.p2-908e76effed9b094fff8f255f3b00750889d39f2.zip
Bug 302137 - [operation] NPE trying to resolve
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java16
2 files changed, 11 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
index 99a1cf8e5..b4b83068d 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
@@ -60,7 +60,8 @@ public class PlannerStatus implements IStatus {
* that are incompatible with the software being installed.
* This includes additional software that will be installed as a result of the change,
* or optional changes and their corresponding explanation.
- * @return A map of {@link IInstallableUnit} to {@link IStatus} of the additional
+ * @return A map of {@link IInstallableUnit} to {@link IStatus} of the additional side effect
+ * status, or <code>null</code> if there are no side effects.
*/
public Map<IInstallableUnit, RequestStatus> getRequestSideEffects() {
return requestSideEffects;
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
index f1877f040..3b2d72a1c 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
@@ -131,13 +131,15 @@ public class PlanAnalyzer {
}
// Now process the side effects
- for (Entry<IInstallableUnit, RequestStatus> entry : plannerStatus.getRequestSideEffects().entrySet()) {
- IInstallableUnit iu = entry.getKey();
- RequestStatus rs = entry.getValue();
- if (rs.getInitialRequestType() == RequestStatus.ADDED) {
- report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_INSTALL, NLS.bind(Messages.PlanAnalyzer_SideEffectInstall, getIUString(iu)), null));
- } else {
- report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_REMOVE, NLS.bind(Messages.PlanAnalyzer_SideEffectUninstall, getIUString(iu)), null));
+ if (plannerStatus.getRequestSideEffects() != null) {
+ for (Entry<IInstallableUnit, RequestStatus> entry : plannerStatus.getRequestSideEffects().entrySet()) {
+ IInstallableUnit iu = entry.getKey();
+ RequestStatus rs = entry.getValue();
+ if (rs.getInitialRequestType() == RequestStatus.ADDED) {
+ report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_INSTALL, NLS.bind(Messages.PlanAnalyzer_SideEffectInstall, getIUString(iu)), null));
+ } else {
+ report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_REMOVE, NLS.bind(Messages.PlanAnalyzer_SideEffectUninstall, getIUString(iu)), null));
+ }
}
}

Back to the top