Repository: hbase Updated Branches: refs/heads/branch-1.4 f38f390f0 -> 1595ceef2
HBASE-19985 Redundant instanceof check in ProtobufUtil#getServiceException Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1595ceef Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1595ceef Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1595ceef Branch: refs/heads/branch-1.4 Commit: 1595ceef215812fedc597a71f720bc6e57bd20c8 Parents: f38f390 Author: dbist13 <[email protected]> Authored: Sat Mar 3 02:49:43 2018 -0800 Committer: dbist13 <[email protected]> Committed: Sat Mar 3 02:49:43 2018 -0800 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/1595ceef/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java ---------------------------------------------------------------------- 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 84d4a67..a76353b 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); }
