code cleanup: removing unnecessary Collections.unmodifiableMap (System.getEnv() and...
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 26 May 2015 09:53:14 +0000 (12:53 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 26 May 2015 09:53:14 +0000 (12:53 +0300)
platform/platform-api/src/com/intellij/execution/configurations/GeneralCommandLine.java

index c08353cc652405bcfc4fc4713f05d583146d4376..36ea80f1b741142202ab59652dd0a3d6042f1a1c 100644 (file)
@@ -143,12 +143,12 @@ public class GeneralCommandLine implements UserDataHolder {
   }
 
   /**
-   * @return Environment, that will be passed to the process if isPassParentEnvironment() == true
+   * @return unmodifiable map of the parent environment, that will be passed to the process if isPassParentEnvironment() == true
    */
   @NotNull
   public Map<String, String> getParentEnvironment() {
-    return Collections.unmodifiableMap(PlatformUtils.isAppCode() ? System.getenv() // Temporarily fix for OC-8606
-                                                                 : EnvironmentUtil.getEnvironmentMap());
+    return PlatformUtils.isAppCode() ? System.getenv() // Temporarily fix for OC-8606
+                                     : EnvironmentUtil.getEnvironmentMap();
   }
 
   public void addParameters(String... parameters) {