merged fix from default for bug #11625.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo2.java Thu Jul 08 20:06:31 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/EnvironmentVarsInfo2.java Fri Jul 09 08:28:44 2010 -0500
@@ -441,8 +441,11 @@
private Map<String, String> stringArrayToMap(String[] array) {
Map<String, String> map = new HashMap<String, String>(array.length);
for (String var : array) {
- String[] split = var.split("=");
- map.put(split[0], split[1]);
+ int idx = var.indexOf('=');
+ if (idx > 0)
+ map.put(var.substring(0, idx), var.substring(idx+1));
+ else if (var.length() > 0)
+ map.put(var, "");
}
return map;