You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2020/09/04 14:57:00 UTC

[jira] [Created] (DAFFODIL-2391) Improve saftey of InfosetImpl

Steve Lawrence created DAFFODIL-2391:
----------------------------------------

             Summary: Improve saftey of InfosetImpl
                 Key: DAFFODIL-2391
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2391
             Project: Daffodil
          Issue Type: Improvement
          Components: Back End, Clean Ups
            Reporter: Steve Lawrence


In InfosetImpl, DIComplex and DIArrays have arrays of child elements. To reduce memory usage, Daffodil will set some of these array indices to null to if we determine that they will never be accessed again. Unfortunately, this means that if there is a bug in Daffodil and it does get accessed then we'll get a NullPointerException. We should refactor this code to avoid potential NPE's, likely by changing these array contents to Maybe's.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)