Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-214

Inconsistent synchronization of fields

    Details

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

      Description

      The field ByteArrayOutputStream.count is always accessed in a synchronised block, apart from when the user calls toBufferedInputStream().

      This seems wrong.

      Similarly for the count field in CountingOutputStream.beforeWrite(int n)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: