IDEA-99921 When for HTTP Proxy authentication no 'save password' option is selected, Login dialog appears few times

This commit is contained in:
irengrig
2013-01-29 21:09:31 +04:00
parent 860219e5ae
commit c2d4abd427
@@ -169,8 +169,9 @@ public class HttpConfigurable implements PersistentStateComponent<HttpConfigurab
}
public PasswordAuthentication getPromptedAuthentication(final String host, final String prompt) {
if (PROXY_AUTHENTICATION && KEEP_PROXY_PASSWORD) {
return new PasswordAuthentication(PROXY_LOGIN, getPlainProxyPassword().toCharArray());
final String password = getPlainProxyPassword();
if (! StringUtil.isEmptyOrSpaces(PROXY_LOGIN) && ! StringUtil.isEmptyOrSpaces(password)) {
return new PasswordAuthentication(PROXY_LOGIN, password.toCharArray());
}
final PasswordAuthentication[] value = new PasswordAuthentication[1];
final Runnable runnable = new Runnable() {