#vulnerable code 
                                @Override
    public void modifyTable(byte[] tableName, HTableDescriptor newDesc) throws IOException,
            InterruptedException, TimeoutException {
    	HBaseAdmin admin = new HBaseAdmin(config);
        if (!allowOnlineTableSchemaUpdate()) {
            admin.disableTable(tableName);
            admin.modifyTable(tableName, newDesc);
            admin.enableTable(tableName);
        } else {
            admin.modifyTable(tableName, newDesc);
            pollForUpdatedTableDescriptor(admin, newDesc, tableName);
        }
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public void modifyTable(byte[] tableName, HTableDescriptor newDesc) throws IOException,
    InterruptedException, TimeoutException {
    	try (HBaseAdmin admin = new HBaseAdmin(config)) {
    		if (!allowOnlineTableSchemaUpdate()) {
    			admin.disableTable(tableName);
    			admin.modifyTable(tableName, newDesc);
    			admin.enableTable(tableName);
    		} else {
    			admin.modifyTable(tableName, newDesc);
    			pollForUpdatedTableDescriptor(admin, newDesc, tableName);
    		}
    	}
    }