gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis John McGibbney (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GORA-526) Potential null dereference in AvroSerializer#analyzePersistent
Date Mon, 11 Sep 2017 14:02:00 GMT

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

Lewis John McGibbney updated GORA-526:
--------------------------------------
    Fix Version/s: 0.8

> 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
>            Priority: Minor
>             Fix For: 0.8
>
>
> 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)

Mime
View raw message