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

ResizableDoubleArray is not thread-safe yet has some synch. methods

    Details

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

      Description

      ResizableDoubleArray has several synchronised methods, but is not thread-safe, because class variables are not always accessed using the lock.

      Is the class supposed to be thread-safe?

      If so, all accesses (read and write) need to be synch.

      If not, the synch. qualifiers could be dropped.

      In any case, the protected fields need to be made private.

        Attachments

        1. MATH-757.patch
          53 kB
          Thomas Neidhart

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sebb@apache.org Sebb
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: