HADOOP-9844. NPE when trying to create an error message response of SASL RPC
This closes #55
Change-Id: I10a20380565fa89762f4aa564b2f1c83b9aeecdc
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit 07530314c2
)
This commit is contained in:
parent
bf4a2258ce
commit
1b7c7dc860
|
@ -26,9 +26,8 @@ import java.io.IOException;
|
|||
*/
|
||||
public class IpcException extends IOException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
final String errMsg;
|
||||
|
||||
public IpcException(final String err) {
|
||||
errMsg = err;
|
||||
super(err);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2041,7 +2041,7 @@ public abstract class Server {
|
|||
private void doSaslReply(Exception ioe) throws IOException {
|
||||
setupResponse(authFailedCall,
|
||||
RpcStatusProto.FATAL, RpcErrorCodeProto.FATAL_UNAUTHORIZED,
|
||||
null, ioe.getClass().getName(), ioe.getLocalizedMessage());
|
||||
null, ioe.getClass().getName(), ioe.toString());
|
||||
sendResponse(authFailedCall);
|
||||
}
|
||||
|
||||
|
@ -2436,7 +2436,8 @@ public abstract class Server {
|
|||
final RpcCall call = new RpcCall(this, callId, retry);
|
||||
setupResponse(call,
|
||||
rse.getRpcStatusProto(), rse.getRpcErrorCodeProto(), null,
|
||||
t.getClass().getName(), t.getMessage());
|
||||
t.getClass().getName(),
|
||||
t.getMessage() != null ? t.getMessage() : t.toString());
|
||||
sendResponse(call);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue