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

BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.2
    • Streams/Writers
    • None

    Description

      BoundedInputStream.read() treats max differently from BoundedInputStream.read(byte[]...)

      read() checks for pos == max, whereas read(byte[]...) checks for pos >= max.

      The latter check is safer (works even if pos overshoots max).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: