diff options
author | Uwe Stieber | 2013-10-16 16:37:56 +0000 |
---|---|---|
committer | Uwe Stieber | 2013-10-16 16:37:56 +0000 |
commit | 58467c11fab14d62f97db98bfc274f51e9abc61d (patch) | |
tree | 0d90118a00421aa14fbb15ea544fb80699bbc23d /target_explorer/plugins/org.eclipse.tcf.te.runtime | |
parent | 1ee7056a50a3d265035f17453e553d2f54763c19 (diff) | |
download | org.eclipse.tcf-58467c11fab14d62f97db98bfc274f51e9abc61d.tar.gz org.eclipse.tcf-58467c11fab14d62f97db98bfc274f51e9abc61d.tar.xz org.eclipse.tcf-58467c11fab14d62f97db98bfc274f51e9abc61d.zip |
Target Explorer: Always preserve the case of the environment variables
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java index e54a48389..7b67658d4 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java @@ -31,8 +31,6 @@ public class Env { // Reference to the monitor to lock if determining the native environment private final static Object ENV_GET_MONITOR = new Object(); - // Reference to the native environment once retrieved - private static Map<String, String> nativeEnvironment = null; // Reference to the native environment with the case of the variable names preserved private static Map<String, String> nativeEnvironmentCasePreserved = null; @@ -52,7 +50,7 @@ public class Env { * @return The merged environment. */ public static String[] getEnvironment(String[] envp, boolean terminal) { - Map<String, String> env = getNativeEnvironment(); + Map<String, String> env = getNativeEnvironmentCasePreserved(); if (terminal) env.put("TERM", "ansi"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -83,31 +81,6 @@ public class Env { } /** - * Determine the native environment, but returns all environment variable - * names in upper case. - * - * @return The native environment with upper case variable names, or an empty map. - */ - private static Map<String, String> getNativeEnvironment() { - synchronized (ENV_GET_MONITOR) { - if (nativeEnvironment == null) { - Map<String, String> casePreserved = getNativeEnvironmentCasePreserved(); - if (Platform.getOS().equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) { - nativeEnvironment = new HashMap<String, String>(); - Iterator<Map.Entry<String, String>> entries = casePreserved.entrySet().iterator(); - while (entries.hasNext()) { - Map.Entry<String, String> entry = entries.next(); - nativeEnvironment.put(entry.getKey().toUpperCase(), entry.getValue()); - } - } else { - nativeEnvironment = new HashMap<String, String>(casePreserved); - } - } - return new HashMap<String, String>(nativeEnvironment); - } - } - - /** * Determine the native environment. * * @return The native environment, or an empty map. |