Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2365

ByteBufferUtil.read(byte[]) returns 0 when the end of the stream has been reached.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.7.5
    • None
    • None
    • Low

    Description

      read(byte[], int, int) doesn't return -1 when the end of the stream is reached. Instead, it returns 0.

      len = Math.min(len, copy.remaining());
      copy.get(bytes, off, len);

      return len;

      copy.remaining() returns 0 when the end of the stream is reached.

      Attachments

        1. 2365.txt
          0.6 kB
          Jonathan Ellis

        Activity

          People

            jbellis Jonathan Ellis
            julie.zhang10 Yewei Zhang
            Jonathan Ellis
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: