cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] git commit: Don't modify thrift list directly (as this doesn't work)
Date Mon, 12 Nov 2012 11:19:58 GMT
Updated Branches:
  refs/heads/cassandra-1.2 de6260ddc -> 91187643b


Don't modify thrift list directly (as this doesn't work)


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/91187643
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/91187643
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/91187643

Branch: refs/heads/cassandra-1.2
Commit: 91187643babfa9d52ba64161cd109765a1a3a3ad
Parents: 020a837
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Nov 12 12:18:48 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Nov 12 12:18:48 2012 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cli/CliClient.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/91187643/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java
index 3060359..a4b4483 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -2796,7 +2796,6 @@ public class CliClient
      */
     private void updateColumnMetaData(CfDef columnFamily, ByteBuffer columnName, String validationClass)
     {
-        List<ColumnDef> columnMetaData = columnFamily.getColumn_metadata();
         ColumnDef column = getColumnDefByName(columnFamily, columnName);
 
         if (column != null)
@@ -2810,7 +2809,9 @@ public class CliClient
         }
         else
         {
+            List<ColumnDef> columnMetaData = new ArrayList<ColumnDef>(columnFamily.getColumn_metadata());
             columnMetaData.add(new ColumnDef(columnName, validationClass));
+            columnFamily.setColumn_metadata(columnMetaData);
         }
     }
 


Mime
View raw message