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/05/08 12:17:00 UTC
[jira] [Created] (DAFFODIL-2338) Use consistent validation of
primitives
Steve Lawrence created DAFFODIL-2338:
----------------------------------------
Summary: Use consistent validation of primitives
Key: DAFFODIL-2338
URL: https://issues.apache.org/jira/browse/DAFFODIL-2338
Project: Daffodil
Issue Type: Bug
Components: Back End
Reporter: Steve Lawrence
Fix For: 3.0.0
We use the isValidRange function in NodeInfo primititives to determine what values are not in the correct range of the type, and error accodingly. This logic is spread out in mutiple places that need to do range checking. And in some places (such as NodeInfo fromXMLString) we don't even do range checking.
Instead of having this logic spread out, we should consolidate ranging checking logic in a single place, presumably in NodeInfo fromXMLString and fromNumber. These functions should only ever return a valid primitive in a valid range, or they should throw an exception if they aren't valid and why. We then modify all uses of these function to catch this exception and handle appropriately.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)