Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-526

Potential null dereference in AvroSerializer#analyzePersistent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.9
    • None
    • None

    Description

      In ctor:

          if (PersistentBase.class.isAssignableFrom(dataStore.getPersistentClass())) {
            persistentSchema = ((PersistentBase) dataStore.getBeanFactory().getCachedPersistent()).getSchema();
          } else {
            persistentSchema = null;
      

      In updateByQuery, persistentSchema is passed to CassandraQueryFactory.getUpdateByQueryForAvro() which dereferences the schema without checking:

        public boolean updateByQuery(Query query) {
          List<Object> objectArrayList = new ArrayList<>();
          String cqlQuery = CassandraQueryFactory.getUpdateByQueryForAvro(mapping, query, objectArrayList, persistentSchema);
      

      Attachments

        Issue Links

          Activity

            People

              madhawa Madhawa Kasun Gunasekara
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: