Commons IO
  1. Commons IO
  2. IO-273

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: Streams/Writers
    • Labels:
      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).

        Activity

        Hide
        Gary Gregory added a comment -

        Version 2.2 has been released and addresses this issue.

        Show
        Gary Gregory added a comment - Version 2.2 has been released and addresses this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development