Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-861

Make sure that entries of FieldVectors cannot be null

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2

      Description

      As part of MATH-854, an extensive review of exceptions possibly thrown throughout CM is being carried out.

      It turns out that in FieldVector, NullArgumentException}}s may occur because {{FieldElement throws such an exception for all elementary operation. In FieldVector, this has an impact on

      • operations involving a FieldElement as an argument, eg mapAdd(T d) and the likes: for these method, the throws clause has been altered.
      • operations involving a FieldVector as an argument, eg add(FieldVector<T> v. In order to avoid catching and rethrowing a NullArgumentException, all implementations of FieldVector should make sure that no vector entry can be null.

      As a consequence

      • the above statement must be added to the class comment of FieldVector
      • all constructors, setters and the likes must explicitely check for null

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              celestin S├ębastien Brisard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: