HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor
This commit is contained in:
parent
547d97f5ca
commit
edcac04ac1
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue