HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor
This commit is contained in:
parent
8adf6857c7
commit
f2e363b589
|
@ -163,6 +163,9 @@ public class HTable implements Table {
|
||||||
if (connection == null || connection.isClosed()) {
|
if (connection == null || connection.isClosed()) {
|
||||||
throw new IllegalArgumentException("Connection is null or closed.");
|
throw new IllegalArgumentException("Connection is null or closed.");
|
||||||
}
|
}
|
||||||
|
if (tableName == null) {
|
||||||
|
throw new IllegalArgumentException("Given table name is null");
|
||||||
|
}
|
||||||
this.tableName = tableName;
|
this.tableName = tableName;
|
||||||
this.cleanupConnectionOnClose = false;
|
this.cleanupConnectionOnClose = false;
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
|
|
|
@ -78,6 +78,9 @@ public abstract class RegionServerCallable<T, S> implements RetryingCallable<T>
|
||||||
RpcController rpcController) {
|
RpcController rpcController) {
|
||||||
super();
|
super();
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
|
if (tableName == null) {
|
||||||
|
throw new IllegalArgumentException("Given tableName is null");
|
||||||
|
}
|
||||||
this.tableName = tableName;
|
this.tableName = tableName;
|
||||||
this.row = row;
|
this.row = row;
|
||||||
this.rpcController = rpcController;
|
this.rpcController = rpcController;
|
||||||
|
|
Loading…
Reference in New Issue