HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor (addendum)
This commit is contained in:
parent
b2086873a9
commit
15fe3d3279
|
@ -78,9 +78,6 @@ 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;
|
||||
|
@ -208,8 +205,8 @@ public abstract class RegionServerCallable<T, S> implements RetryingCallable<T>
|
|||
|
||||
public void prepare(final boolean reload) throws IOException {
|
||||
// check table state if this is a retry
|
||||
if (reload && !tableName.equals(TableName.META_TABLE_NAME) &&
|
||||
getConnection().isTableDisabled(tableName)) {
|
||||
if (reload && tableName != null && !tableName.equals(TableName.META_TABLE_NAME)
|
||||
&& getConnection().isTableDisabled(tableName)) {
|
||||
throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled.");
|
||||
}
|
||||
try (RegionLocator regionLocator = connection.getRegionLocator(tableName)) {
|
||||
|
|
|
@ -92,7 +92,7 @@ public class TestRpcControllerFactory {
|
|||
super.setPriority(tn);
|
||||
// ignore counts for system tables - it could change and we really only want to check on what
|
||||
// the client should change
|
||||
if (!tn.isSystemTable()) {
|
||||
if (tn != null && !tn.isSystemTable()) {
|
||||
TABLE_PRIORITY.incrementAndGet();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue