5050import static com .microsoft .azuretools .telemetry .TelemetryConstants .RESIGNIN ;
5151import static com .microsoft .azuretools .telemetry .TelemetryConstants .SIGNIN_METHOD ;
5252
53+ import lombok .Lombok ;
5354import reactor .core .publisher .Hooks ;
5455import reactor .core .publisher .Mono ;
5556import reactor .core .scheduler .Schedulers ;
57+ import rx .exceptions .Exceptions ;
5658
5759public class AuthMethodManager {
5860 private static final org .apache .log4j .Logger LOGGER =
@@ -66,7 +68,8 @@ public class AuthMethodManager {
6668 static {
6769 // fix the class load problem for intellij plugin
6870 ClassLoader current = Thread .currentThread ().getContextClassLoader ();
69- Logger .getLogger (com .microsoft .aad .adal4j .AuthenticationContext .class ).setLevel (Level .OFF );
71+ Logger .getLogger ("com.microsoft.aad.msal4j.PublicClientApplication" ).setLevel (Level .OFF );
72+
7073 try {
7174 Thread .currentThread ().setContextClassLoader (AuthMethodManager .class .getClassLoader ());
7275 HttpClientProviders .createInstance ();
@@ -75,6 +78,14 @@ public class AuthMethodManager {
7578 com .microsoft .azure .toolkit .lib .Azure .az (AzureCloud .class )
7679 .set (AzureEnvironmentUtils .stringToAzureEnvironment (CommonSettings .getEnvironment ().getName ()));
7780 }
81+ Hooks .onErrorDropped (ex -> {
82+ if (Exceptions .getFinalCause (ex ) instanceof InterruptedException ) {
83+ LOGGER .info (ex .getMessage ());
84+ }
85+ throw Lombok .sneakyThrow (ex );
86+ });
87+
88+
7889 } finally {
7990 Thread .currentThread ().setContextClassLoader (current );
8091 }
0 commit comments