Repository: hbase Updated Branches: refs/heads/master 8adf6857c -> f2e363b58
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/f2e363b5 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f2e363b5 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f2e363b5 Branch: refs/heads/master Commit: f2e363b589827eeaad2c22a39b96be714c0e9d41 Parents: 8adf685 Author: Yu Li <[email protected]> Authored: Thu Dec 1 02:25:31 2016 +0800 Committer: Yu Li <[email protected]> Committed: Thu Dec 1 02:25:31 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/f2e363b5/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 c56132c..dd11abf 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 @@ -163,6 +163,9 @@ public class HTable implements Table { 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/f2e363b5/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 b97743f..96434f9 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 @@ -78,6 +78,9 @@ public abstract class RegionServerCallable<T, S> implements RetryingCallable<T> RpcController rpcController) { super(); this.connection = connection; + if (tableName == null) { + throw new IllegalArgumentException("Given tableName is null"); + } this.tableName = tableName; this.row = row; this.rpcController = rpcController;
