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
|
||||
* @return Exception wrapped in ServiceException.
|
||||
*/
|
||||
public static IOException getServiceException(ServiceException e) {
|
||||
Throwable t = e;
|
||||
if (e instanceof ServiceException) {
|
||||
t = e.getCause();
|
||||
}
|
||||
public static IOException getServiceException(ServiceException se) {
|
||||
Throwable t = se.getCause();
|
||||
if (ExceptionUtil.isInterrupt(t)) {
|
||||
return ExceptionUtil.asInterrupt(t);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue