Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2593

ResettableFileInputStream returns negate values from read() method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
      None

      Description

      the int value returned from the method should be in range 0-255 for a byte read, or -1 when EOF was reached, as described in InputStream class javadoc.

      Fix is to change the line in read() method:

       return byteBuf[0];
      

      to

       return byteBuf[0] & 0xFF;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                myr0ch@gmail.com Miroslav Holubec
                Reporter:
                myroch Miroslav Holubec
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: