--- .../org/apache/hadoop/hbase/client/HTablePool.java | 3 +-- .../apache/hadoop/hbase/client/TestHTablePool.java | 16 ---------------- 2 files changed, 1 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java b/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java index a5c198f..d502c6b 100755 --- a/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java @@ -320,12 +320,11 @@ public class HTablePool implements Closeable { * wrapped table back to the table pool * */ - class PooledHTable extends HTable { + class PooledHTable implements HTableInterface { private HTableInterface table; // actual table implementation public PooledHTable(HTableInterface table) throws IOException { - super(table.getConfiguration(), table.getTableName()); this.table = table; } diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java b/src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java index 79b3274..aa51bd2 100644 --- a/src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java +++ b/src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java @@ -185,22 +185,6 @@ public class TestHTablePool { Assert.assertTrue("alien table rejected", true); } } - - @Test - public void testClassCastException() { - //this test makes sure that client code that - //casts the table it got from pool to HTable won't break - HTablePool pool = new HTablePool(TEST_UTIL.getConfiguration(), - Integer.MAX_VALUE); - String tableName = Bytes.toString(TABLENAME); - try { - // get table and check if type is HTable - HTable table = (HTable) pool.getTable(tableName); - Assert.assertTrue("return type is HTable as expected", true); - } catch (ClassCastException e) { - Assert.fail("return type is not HTable"); - } - } } public static class TestHTableReusablePool extends TestHTablePoolType { -- 1.7.7.5 (Apple Git-26)