[
https://issues.apache.org/jira/browse/GORA-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13872721#comment-13872721
]
Talat UYARER commented on GORA-283:
-----------------------------------
Hi [~lewismc], In the else, We use toString method. But If value is null, it
will be into else. This cause NPE.
{code:title=CassandraStore.java|borderStyle=solid}
case UNION:
if(value != null) {
LOG.debug("Union with value: " + value.toString() + " at index: " +
getUnionSchema(value, schema) + " supported for field: " + field.name());
this.cassandraClient.addColumn(key, field.name(), value);
} else {
LOG.warn("Union with value: " + value.toString() + " at index: " +
getUnionSchema(value, schema) + " not supported for field: " + field.name());
}
default:
LOG.warn("Type: " + type.name() + " with value: " + value.toString() +
" not considered for field: " + field.name() + ". Please report this
to [email protected]");
}
}
{code}
> Specify field name for types not being considered in gora-cassandra
> -------------------------------------------------------------------
>
> Key: GORA-283
> URL: https://issues.apache.org/jira/browse/GORA-283
> Project: Apache Gora
> Issue Type: Task
> Components: gora-cassandra
> Affects Versions: 0.4
> Reporter: Lewis John McGibbney
> Priority: Minor
> Fix For: 0.4
>
> Attachments: GORA-283.patch, GORA-283v2.patch
>
>
> Logging for the following code in the above method can easily be improved.
> {code}
> 443 default:
> 444 LOG.info("Type not considered: " + type.name());
> 445 }
> {code}
> It should also provide the field.name(), something like
> LOG.info("Type not considered: " + type.name() + " for field: " field.name());
> I'll cook a patch and get it posted for review.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)