You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Juan Pablo Mora (JIRA)" <ji...@apache.org> on 2013/12/09 12:47:07 UTC

[jira] [Updated] (CASSANDRA-6461) CQLSSTableWriter throws NPE on addRow(Map values)

     [ https://issues.apache.org/jira/browse/CASSANDRA-6461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juan Pablo Mora updated CASSANDRA-6461:
---------------------------------------

    Description: 
On 2.0.3 version CQLSSTableWriter throws NPE on method addRow ( Map<String, Object> values ) on line  159 :
{code:java}
rawValues.add(((AbstractType)spec.type).decompose(values.get(spec.name.toString())));
{code}

I think the solution is to copy the code of method   addRow(List<Object> values) because it has a control over null values :

{code:java}
133: rawValues.add(values.get(i) == null ? null :  (AbstractType)boundNames.get(i).type).decompose(values.get(i)));
{code}


  was:
On 2.0.3 version CQLSSTableWriter throws NPE on method addRow ( Map<String, Object> values ) on line  159 :

rawValues.add(((AbstractType)spec.type).decompose(values.get(spec.name.toString())));

I think the solution is to copy the code of method   addRow(List<Object> values) because it has a control over null values :

Line 133: rawValues.add(values.get(i) == null ? null : ((AbstractType)boundNames.get(i).type).decompose(values.get(i)));




> CQLSSTableWriter throws NPE on addRow(Map values)
> -------------------------------------------------
>
>                 Key: CASSANDRA-6461
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6461
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Juan Pablo Mora
>
> On 2.0.3 version CQLSSTableWriter throws NPE on method addRow ( Map<String, Object> values ) on line  159 :
> {code:java}
> rawValues.add(((AbstractType)spec.type).decompose(values.get(spec.name.toString())));
> {code}
> I think the solution is to copy the code of method   addRow(List<Object> values) because it has a control over null values :
> {code:java}
> 133: rawValues.add(values.get(i) == null ? null :  (AbstractType)boundNames.get(i).type).decompose(values.get(i)));
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)