[ 
https://issues.apache.org/jira/browse/GORA-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16179263#comment-16179263
 ] 

Madhawa Gunasekara commented on GORA-526:
-----------------------------------------

[~lewismc]

I have already added the test cases for the update By query in cassandra data 
store for both Avro serializations and native serializations.

you can find test casees in 

native : 
https://github.com/apache/gora/blob/master/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java#L254
Avro : 
https://github.com/apache/gora/blob/master/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithCassandraKey.java#L224

Thanks,
Madhawa

> Potential null dereference in AvroSerializer#analyzePersistent
> --------------------------------------------------------------
>
>                 Key: GORA-526
>                 URL: https://issues.apache.org/jira/browse/GORA-526
>             Project: Apache Gora
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Madhawa Gunasekara
>            Priority: Minor
>             Fix For: 0.9
>
>
> In ctor:
> {code}
>     if 
> (PersistentBase.class.isAssignableFrom(dataStore.getPersistentClass())) {
>       persistentSchema = ((PersistentBase) 
> dataStore.getBeanFactory().getCachedPersistent()).getSchema();
>     } else {
>       persistentSchema = null;
> {code}
> In updateByQuery, persistentSchema is passed to 
> CassandraQueryFactory.getUpdateByQueryForAvro() which dereferences the schema 
> without checking:
> {code}
>   public boolean updateByQuery(Query query) {
>     List<Object> objectArrayList = new ArrayList<>();
>     String cqlQuery = CassandraQueryFactory.getUpdateByQueryForAvro(mapping, 
> query, objectArrayList, persistentSchema);
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to