hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject hbase git commit: HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor
Date Wed, 30 Nov 2016 18:26:42 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 547d97f5c -> edcac04ac


HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/edcac04a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/edcac04a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/edcac04a

Branch: refs/heads/branch-1
Commit: edcac04ac1e61dae40fc3cbbe357e5f832c9dba2
Parents: 547d97f
Author: Yu Li <liyu@apache.org>
Authored: Thu Dec 1 02:25:31 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Thu Dec 1 02:26:14 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/client/HTable.java      | 3 +++
 .../java/org/apache/hadoop/hbase/client/RegionServerCallable.java | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/edcac04a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
index 6b5b9a8..83e7217 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
@@ -307,6 +307,9 @@ public class HTable implements HTableInterface, RegionLocator {
     if (connection == null || connection.isClosed()) {
       throw new IllegalArgumentException("Connection is null or closed.");
     }
+    if (tableName == null) {
+      throw new IllegalArgumentException("Given table name is null");
+    }
     this.tableName = tableName;
     this.cleanupConnectionOnClose = false;
     this.connection = connection;

http://git-wip-us.apache.org/repos/asf/hbase/blob/edcac04a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
index 0997b10..09f58a4 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
@@ -60,6 +60,9 @@ public abstract class RegionServerCallable<T> implements RetryingCallable<T>
{
    */
   public RegionServerCallable(Connection connection, TableName tableName, byte [] row) {
     this.connection = connection;
+    if (tableName == null) {
+      throw new IllegalArgumentException("Given tableName is null");
+    }
     this.tableName = tableName;
     this.row = row;
   }


Mime
View raw message