HBASE-19985 Redundant instanceof check in ProtobufUtil#getServiceException
This commit is contained in:
parent
aae12e8470
commit
4bdfa342a5
@ -337,11 +337,8 @@ public final class ProtobufUtil {
|
|||||||
* @param se ServiceException that wraps IO exception thrown by the server
|
* @param se ServiceException that wraps IO exception thrown by the server
|
||||||
* @return Exception wrapped in ServiceException.
|
* @return Exception wrapped in ServiceException.
|
||||||
*/
|
*/
|
||||||
public static IOException getServiceException(ServiceException e) {
|
public static IOException getServiceException(ServiceException se) {
|
||||||
Throwable t = e;
|
Throwable t = se.getCause();
|
||||||
if (e instanceof ServiceException) {
|
|
||||||
t = e.getCause();
|
|
||||||
}
|
|
||||||
if (ExceptionUtil.isInterrupt(t)) {
|
if (ExceptionUtil.isInterrupt(t)) {
|
||||||
return ExceptionUtil.asInterrupt(t);
|
return ExceptionUtil.asInterrupt(t);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user