Skip to content

Commit

Permalink
fixes for null check
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmishra committed Sep 21, 2012
1 parent d1f61b0 commit 3284d87
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -286,16 +286,19 @@ public static void truncateColumnFamily(String keyspace, String... columns)
{
try
{
client.set_keyspace(keyspace);
for (String column : columns)
if (client != null)
{
if(columnFamilyExist(column, keyspace))
client.set_keyspace(keyspace);
for (String column : columns)
{
client.truncate(column);
if (columnFamilyExist(column, keyspace))
{
client.truncate(column);
}
}
}
}
catch(IllegalArgumentException iex)
catch (IllegalArgumentException iex)
{
// do nothing.
}
Expand Down

0 comments on commit 3284d87

Please sign in to comment.