Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-02-29 19:26:34 +0000
committerJohn Arthorne2008-02-29 19:26:34 +0000
commite2366baae12cf6fd8d3776abf2ad0a9405c42723 (patch)
tree6e2ec5194cccc433fe09c4c0f0d802854f9d84d1
parent673b32d16953a7ea39d3b55a2b82756fd1b79042 (diff)
downloadrt.equinox.p2-e2366baae12cf6fd8d3776abf2ad0a9405c42723.tar.gz
rt.equinox.p2-e2366baae12cf6fd8d3776abf2ad0a9405c42723.tar.xz
rt.equinox.p2-e2366baae12cf6fd8d3776abf2ad0a9405c42723.zip
Avoid NPE for missing variable
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
index 66b03c6a1..fbf94d7e4 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
@@ -60,7 +60,8 @@ public class ParameterizedProvisioningAction extends ProvisioningAction {
String preVariable = parameterValue.substring(0, variableBeginIndex);
String variableName = parameterValue.substring(variableBeginIndex + 2, variableEndIndex);
- String variableValue = parameters.get(variableName).toString();
+ Object value = parameters.get(variableName);
+ String variableValue = value == null ? "" : value.toString(); //$NON-NLS-1$
String postVariable = processVariables(parameterValue.substring(variableEndIndex + 1), parameters);
return preVariable + variableValue + postVariable;
}

Back to the top