diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index 84d4a6780db..a76353ba669 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -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); }