You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2018/03/03 10:45:53 UTC
hbase git commit: HBASE-19985 Redundant instanceof check in
ProtobufUtil#getServiceException
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 <ar...@gmail.com>
Authored: Sat Mar 3 02:45:40 2018 -0800
Committer: dbist13 <ar...@gmail.com>
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);
}