Index: hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java (revision 1545384) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java (working copy) @@ -260,7 +260,7 @@ String tableName = Bytes.toString(table.getTableName()); if (tables.size(tableName) >= maxSize) { // release table instance since we're not reusing it - this.tables.remove(tableName, table); + this.tables.removeValue(tableName, table); this.tableFactory.releaseHTableInterface(table); return; } Index: hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java (revision 1545384) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java (working copy) @@ -967,7 +967,7 @@ // release the resources // first thing to do;take the connection out of the connection list synchronized (connections) { - connections.remove(remoteId, this); + connections.removeValue(remoteId, this); } // close the streams and therefore the socket Index: hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java (revision 1545384) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java (working copy) @@ -88,12 +88,20 @@ public V remove(Object key) { Pool pool = pools.remove(key); if (pool != null) { - remove((K) key, pool.get()); + removeValue((K) key, pool.get()); } return null; } + /** + * @deprecated Will be removed for Java 8, use {@link #removeValue} instead + */ + @Deprecated public boolean remove(K key, V value) { + return removeValue(key, value); + } + + public boolean removeValue(K key, V value) { Pool pool = pools.get(key); boolean res = false; if (pool != null) {