Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-130

ByteString.copyOf(byte[] b, int offs, int len) does not work if offs > 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0.Beta2
    • None
    • api
    • None
    • Hide

      Replace the return statement by:
      return new ByteString(Arrays.copyOfRange(b, offs, offs + len));

      Show
      Replace the return statement by: return new ByteString(Arrays.copyOfRange(b, offs, offs + len));

      The method should take offs into account at the Arrays.copyOfRange call:
      return new ByteString(Arrays.copyOfRange(b, offs, len));
      The correct is:
      return new ByteString(Arrays.copyOfRange(b, offs, offs + len));

            flaviarnn Flavia Rainone
            flaviarnn Flavia Rainone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: