HADOOP-13026 Should not wrap IOExceptions into a AuthenticationException in KerberosAuthenticator. Xuan Gong via stevel

This commit is contained in:
Steve Loughran 2016-04-15 17:43:38 +01:00
parent 6e6b6dd5aa
commit 4feed9b2db
1 changed files with 5 additions and 1 deletions

View File

@ -327,7 +327,11 @@ public class KerberosAuthenticator implements Authenticator {
}
});
} catch (PrivilegedActionException ex) {
throw new AuthenticationException(ex.getException());
if (ex.getException() instanceof IOException) {
throw (IOException) ex.getException();
} else {
throw new AuthenticationException(ex.getException());
}
} catch (LoginException ex) {
throw new AuthenticationException(ex);
}