summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2013-04-28 00:18:55 (EDT)
committerPascal Rapicault2013-04-28 00:18:55 (EDT)
commitd4d2021e730b888556662d304bda7fbaa798faed (patch)
treede234f3ec01d7b81b8187431e9a893ecbdb8f208
parent19b4797066d7d68231678bef73ffa79e6fba62b1 (diff)
downloadrt.equinox.p2-d4d2021e730b888556662d304bda7fbaa798faed.zip
rt.equinox.p2-d4d2021e730b888556662d304bda7fbaa798faed.tar.gz
rt.equinox.p2-d4d2021e730b888556662d304bda7fbaa798faed.tar.bz2
fix npe that only occurs in testI20130429-0800I20130428-2000
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
index 1677a06..c5c2308 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
@@ -224,14 +224,18 @@ public class RequestFlexer {
String explainPropertyBackup = null;
try {
temporaryRequest.setProfileProperty("_internal_user_defined_", "true");
- explainPropertyBackup = provisioningContext.getProperty(EXPLANATION_ENABLEMENT);
- provisioningContext.setProperty(EXPLANATION_ENABLEMENT, Boolean.FALSE.toString());
+ if (provisioningContext != null) {
+ explainPropertyBackup = provisioningContext.getProperty(EXPLANATION_ENABLEMENT);
+ provisioningContext.setProperty(EXPLANATION_ENABLEMENT, Boolean.FALSE.toString());
+ }
return planner.getProvisioningPlan(temporaryRequest, provisioningContext, null);
} finally {
- if (explainPropertyBackup == null)
- provisioningContext.getProperties().remove(EXPLANATION_ENABLEMENT);
- else
- provisioningContext.setProperty(EXPLANATION_ENABLEMENT, explainPropertyBackup);
+ if (provisioningContext != null) {
+ if (explainPropertyBackup == null)
+ provisioningContext.getProperties().remove(EXPLANATION_ENABLEMENT);
+ else
+ provisioningContext.setProperty(EXPLANATION_ENABLEMENT, explainPropertyBackup);
+ }
}
}