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

Fix included: MatrixUtils.checkColumnIndex() uses COLUMN_INDEX instead of COLUMN_INDEX_OUT_OF_RANGE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 3.6.1
    • None
    • None
    • None

    Description

      MatrixUtils.checkColumnIndex() uses COLUMN_INDEX instead of COLUMN_INDEX_OUT_OF_RANGE
      similarly for checkRowIndex

      Note that testing could run a script that searches the code for all the LocalizedFormats, and complains if any of them are not used.  In this case, it would have caught this error.

      Another test that would have caught it is parsing the code and checking that the number of arguments matches the number of percent signs.

      =====

      Attached is a fix and a test, both a diff and the 2 files.

      Attachments

        1. diff.txt
          4 kB
          Randy Strauss
        2. MatrixUtils.java
          44 kB
          Randy Strauss
        3. MatrixUtilsTest.java
          20 kB
          Randy Strauss

        Activity

          People

            Unassigned Unassigned
            rastr Randy Strauss
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: