diff options
author | Susan Franklin | 2010-02-15 21:29:50 +0000 |
---|---|---|
committer | Susan Franklin | 2010-02-15 21:29:50 +0000 |
commit | 908e76effed9b094fff8f255f3b00750889d39f2 (patch) | |
tree | cb8c21202f09e7fb967c8ba8c43d659ab5d4e0b4 /bundles | |
parent | 14cdf6dd22112cb007067d32a3c25317bb63d20d (diff) | |
download | rt.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')
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)); + } } } |