diff options
author | Alena Laskavaia | 2009-01-28 15:38:40 +0000 |
---|---|---|
committer | Alena Laskavaia | 2009-01-28 15:38:40 +0000 |
commit | bc804b69350f01423be4075f6f72c1c81dadbc5c (patch) | |
tree | 3efbd5c3cc09a2159bb69804631bd370a1f0e563 /core/org.eclipse.cdt.core/utils | |
parent | 233b122712c72bb86b5fe4e0ffe491d0dc1bad40 (diff) | |
download | org.eclipse.cdt-bc804b69350f01423be4075f6f72c1c81dadbc5c.tar.gz org.eclipse.cdt-bc804b69350f01423be4075f6f72c1c81dadbc5c.tar.xz org.eclipse.cdt-bc804b69350f01423be4075f6f72c1c81dadbc5c.zip |
[262731] - make access thread safe
Diffstat (limited to 'core/org.eclipse.cdt.core/utils')
-rw-r--r-- | core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java index 18442ae4312..031fa8ae5f3 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java @@ -19,7 +19,7 @@ public class EnvironmentReader { private static Properties envVars = null; private static ArrayList<String> rawVars = null; - public static Properties getEnvVars() { + public static synchronized Properties getEnvVars() { if (null != envVars) { return (Properties)envVars.clone(); } @@ -41,9 +41,9 @@ public class EnvironmentReader { return p.getProperty(key); } - public static String[] getRawEnvVars() { + public static synchronized String[] getRawEnvVars() { if (rawVars==null) getEnvVars(); - return rawVars.toArray(new String[0]); + return rawVars.toArray(new String[rawVars.size()]); } } |