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

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

    Details

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

        Attachments

          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: