Commons IO
  1. Commons IO
  2. IO-214

Inconsistent synchronization of fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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)

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development