[ide-core] CommonProxy: use the same collection for storing and removing registrations

GitOrigin-RevId: e8f00345e4e66a8e16d411c0d6e8dbf20aa9900d
This commit is contained in:
Tagir Valeev
2024-06-20 12:13:06 +00:00
committed by intellij-monorepo-bot
parent 9c8c0393e9
commit 5b4e5db8b5
@@ -41,7 +41,6 @@ public final class CommonProxy extends ProxySelector {
private final Object myLock = new Object();
private final Map<String, AccessToken> myCustomRegistrations = new HashMap<>();
private final Map<String, AccessToken> myCustomAuthRegistrations = new HashMap<>();
public static CommonProxy getInstance() {
@@ -161,7 +160,7 @@ public final class CommonProxy extends ProxySelector {
if (register != null) {
LOG.debug("custom auth set: " + key + ", " + nonStaticAuthenticator);
//noinspection resource
myCustomRegistrations.put(key, register.invoke(nonStaticAuthenticator.asAuthenticator()));
myCustomAuthRegistrations.put(key, register.invoke(nonStaticAuthenticator.asAuthenticator()));
}
}
}