Repository: hbase
Updated Branches:
  refs/heads/branch-1 aae12e847 -> 4bdfa342a


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/4bdfa342
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4bdfa342
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4bdfa342

Branch: refs/heads/branch-1
Commit: 4bdfa342a531351342df0cd5ec35eeabe615fa26
Parents: aae12e8
Author: dbist13 <[email protected]>
Authored: Sat Mar 3 02:45:40 2018 -0800
Committer: dbist13 <[email protected]>
Committed: Sat Mar 3 02:45:40 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/4bdfa342/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);
     }

Reply via email to