Commons Math
  1. Commons Math
  2. MATH-257

FastFourierTransformer.MultiDimensionalComplexMatrix.get() not consistent with FastFourierTransformer.MultiDimensionalComplexMatrix.set()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      FastFourierTransformer.MultiDimensionalComplexMatrix.get() is not consistent with FastFourierTransformer.MultiDimensionalComplexMatrix.set().

      The set() method does not allow a null parameter to get past the first check.

      The get() method allows a null parameter provided dimensionSize.length <= 1.

      This seems wrong, both because it is inconsistent and because it may allow an NPE later if dimensionSize.length == 1

        Activity

        Hide
        Luc Maisonobe added a comment -

        fixed in subversion repository as of r762131.
        I took the opportunity to also simplify the initialization of the dimensionSize array, using a two passes algorithm.
        The inconsistency by itself was removed by having bot set and get be no-op for null vectors

        Show
        Luc Maisonobe added a comment - fixed in subversion repository as of r762131. I took the opportunity to also simplify the initialization of the dimensionSize array, using a two passes algorithm. The inconsistency by itself was removed by having bot set and get be no-op for null vectors

          People

          • Assignee:
            Luc Maisonobe
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development