cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r947693 - /cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/cli/CliClient.java
Date Mon, 24 May 2010 16:02:31 GMT
Author: eevans
Date: Mon May 24 16:02:30 2010
New Revision: 947693

URL: http://svn.apache.org/viewvc?rev=947693&view=rev
Log:
input errors causes cli to exit w/ AssertionErrors

Patch by eevans; reviewed by jbellis for CASSANDRA-1059

Modified:
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/cli/CliClient.java

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/cli/CliClient.java?rev=947693&r1=947692&r2=947693&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/cli/CliClient.java Mon
May 24 16:02:30 2010
@@ -25,7 +25,6 @@ import org.antlr.runtime.tree.*;
 
 import static org.apache.cassandra.thrift.ThriftGlue.*;
 
-import org.apache.cassandra.service.*;
 import org.apache.cassandra.thrift.Cassandra;
 import org.apache.cassandra.thrift.Column;
 import org.apache.cassandra.thrift.ColumnOrSuperColumn;
@@ -166,7 +165,8 @@ public class CliClient 
        assert(childCount == 1);
 
        CommonTree columnFamilySpec = (CommonTree)ast.getChild(0);
-       assert(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS);
+       if (!(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS))
+           return;
 
        String tableName = CliCompiler.getTableName(columnFamilySpec);
        String key = CliCompiler.getKey(columnFamilySpec);
@@ -198,7 +198,8 @@ public class CliClient 
         assert(childCount == 1);
 
         CommonTree columnFamilySpec = (CommonTree)ast.getChild(0);
-        assert(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS);
+        if (!(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS))
+            return;
 
         String tableName = CliCompiler.getTableName(columnFamilySpec);
         String key = CliCompiler.getKey(columnFamilySpec);
@@ -328,7 +329,8 @@ public class CliClient 
         assert (ast.getChildCount() == 1) : "serious parsing error (this is a bug).";
 
         CommonTree columnFamilySpec = (CommonTree)ast.getChild(0);
-        assert(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS);
+        if (!(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS))
+            return;
 
         String tableName = CliCompiler.getTableName(columnFamilySpec);
         String key = CliCompiler.getKey(columnFamilySpec);
@@ -396,7 +398,8 @@ public class CliClient 
         assert (ast.getChildCount() == 2) : "serious parsing error (this is a bug).";
 
         CommonTree columnFamilySpec = (CommonTree)ast.getChild(0);
-        assert(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS);
+        if (!(columnFamilySpec.getType() == CliParser.NODE_COLUMN_ACCESS))
+            return;
 
         String tableName = CliCompiler.getTableName(columnFamilySpec);
         String key = CliCompiler.getKey(columnFamilySpec);



Mime
View raw message