IDEA-163920 NPE when saving proxy settings
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Tue, 15 Nov 2016 12:42:48 +0000 (13:42 +0100)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Tue, 15 Nov 2016 12:43:59 +0000 (13:43 +0100)
platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java

index 5e6774401e6a7711d47bcb204f93d92655a44303..727d8fd5c1696224d7698920923669fc77c00104 100644 (file)
@@ -633,7 +633,12 @@ public class HttpConfigurable implements PersistentStateComponent<HttpConfigurab
     return null;
   }
 
-  private void storeSecure(String key, String value) {
+  private void storeSecure(String key, @Nullable String value) {
+    if (value == null) {
+      removeSecure(key);
+      return;
+    }
+
     try {
       //PasswordSafe.getInstance().storePassword(null, HttpConfigurable.class, key, value);
       synchronized (myProxyCredentials) {