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

ResettableFileInputStream returns negate values from read() method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.2
    • 1.7.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: