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

Inconsistent synchronization of fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • Streams/Writers
    • 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

        1. IO-214-Counting-Stream-Sync.patch
          1 kB
          Niall Pemberton

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: