@@ -6798,7 +6798,7 @@ private SqlAuthenticationToken getFedAuthToken(SqlFedAuthInfo fedAuthInfo) throw
67986798 try {
67996799 FedAuthDllInfo dllInfo = AuthenticationJNI .getAccessTokenForWindowsIntegrated (
68006800 fedAuthInfo .stsurl , fedAuthInfo .spn , clientConnectionId .toString (),
6801- ActiveDirectoryAuthentication .JDBC_FEDAUTH_CLIENT_ID , 0 );
6801+ ActiveDirectoryAuthentication .JDBC_FEDAUTH_CLIENT_ID );
68026802
68036803 // AccessToken should not be null.
68046804 assert null != dllInfo .accessTokenBytes ;
@@ -6811,15 +6811,15 @@ private SqlAuthenticationToken getFedAuthToken(SqlFedAuthInfo fedAuthInfo) throw
68116811
68126812 // Break out of the retry loop in successful case.
68136813 break ;
6814- } catch (DLLException adalException ) {
6814+ } catch (DLLException dllException ) {
68156815
6816- // the mssql-jdbc_auth DLL return -1 for errorCategory, if unable to load the
6817- // adalsql DLL
6818- int errorCategory = adalException .getCategory ();
6816+ // The mssql-jdbc_auth DLL returns -1 for errorCategory if unable to load the
6817+ // mssql-auth.dll
6818+ int errorCategory = dllException .getCategory ();
68196819 if (-1 == errorCategory ) {
68206820 MessageFormat form = new MessageFormat (
6821- SQLServerException .getErrString ("R_UnableLoadADALSqlDll " ));
6822- Object [] msgArgs = { Integer .toHexString (adalException .getState ()) };
6821+ SQLServerException .getErrString ("R_UnableLoadMSSQLAuthDll " ));
6822+ Object [] msgArgs = { Integer .toHexString (dllException .getState ()) };
68236823 throw new SQLServerException (form .format (msgArgs ), null );
68246824 }
68256825
@@ -6828,21 +6828,21 @@ private SqlAuthenticationToken getFedAuthToken(SqlFedAuthInfo fedAuthInfo) throw
68286828 || timerHasExpired (timerExpire )
68296829 || (fedauthSleepInterval >= millisecondsRemaining )) {
68306830
6831- String errorStatus = Integer .toHexString (adalException .getStatus ());
6831+ String errorStatus = Integer .toHexString (dllException .getStatus ());
68326832
68336833 if (connectionlogger .isLoggable (Level .FINER )) {
68346834 connectionlogger .fine (
68356835 toString ()
6836- + " SQLServerConnection.getFedAuthToken.AdalException category:"
6836+ + " SQLServerConnection.getFedAuthToken.DLLException category:"
68376837 + errorCategory + " error: " + errorStatus );
68386838 }
68396839
68406840 MessageFormat form = new MessageFormat (
68416841 SQLServerException .getErrString ("R_ADALAuthenticationMiddleErrorMessage" ));
6842- String errorCode = Integer .toHexString (adalException .getStatus ()).toUpperCase ();
6843- Object [] msgArgs1 = { errorCode , adalException .getState () };
6842+ String errorCode = Integer .toHexString (dllException .getStatus ()).toUpperCase ();
6843+ Object [] msgArgs1 = { errorCode , dllException .getState () };
68446844 SQLServerException middleException = new SQLServerException (form .format (msgArgs1 ),
6845- adalException );
6845+ dllException );
68466846
68476847 form = new MessageFormat (SQLServerException .getErrString ("R_MSALExecution" ));
68486848 Object [] msgArgs = { user , authenticationString };
0 commit comments