immutable map instance can be safely passed outside appcode/142.175 clion/142.176 dbe/142.171 idea/142.179 phpstorm/142.174 pycharm/142.180 rubymine/142.177 webstorm/142.172
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Wed, 11 Mar 2015 21:34:22 +0000 (00:34 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Wed, 11 Mar 2015 21:34:22 +0000 (00:34 +0300)
platform/lang-impl/src/com/intellij/execution/configuration/EnvironmentVariablesTextFieldWithBrowseButton.java

index 186aa88ceb6ecbebf3c5881ceacc53bdfc594581..c5d443f5a039964ef1c4de8d5fed38d76270ef74 100644 (file)
@@ -43,6 +43,7 @@ import java.util.List;
 
 public class EnvironmentVariablesTextFieldWithBrowseButton extends TextFieldWithBrowseButton implements UserActivityProviderComponent {
 
+  // immutable map instance with reliable user-specified iteration order
   private Map<String, String> myEnvs = Collections.emptyMap();
   private boolean myPassParentEnvs;
   private final List<ChangeListener> myListeners = ContainerUtil.createLockFreeCopyOnWriteList();
@@ -63,7 +64,7 @@ public class EnvironmentVariablesTextFieldWithBrowseButton extends TextFieldWith
    */
   @NotNull
   public Map<String, String> getEnvs() {
-    return Collections.unmodifiableMap(myEnvs);
+    return myEnvs;
   }
 
   /**