Change javadoc of ByteBuf#indexOf(...) to match its behaviour (#9679)

Motivation

Currently doc != code and so one needs to change. Though behaviour as
currently documented might be more intuitive, we don't want to break
anyone so will adjust the doc instead. See #9503 for discussion.

Modifications

Correct the javadoc of indexOf(...) method in ByteBuf abstract class.

Results

Correct javadoc
This commit is contained in:
Nick Hill 2019-10-24 23:42:30 -07:00 committed by Norman Maurer
parent 2f32e0b8ad
commit f4b4a44c7c

View File

@ -2060,11 +2060,14 @@ public abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {
/** /**
* Locates the first occurrence of the specified {@code value} in this * Locates the first occurrence of the specified {@code value} in this
* buffer. The search takes place from the specified {@code fromIndex} * buffer. The search takes place from the specified {@code fromIndex}
* (inclusive) to the specified {@code toIndex} (exclusive). * (inclusive) to the specified {@code toIndex} (exclusive).
* <p> * <p>
* If {@code fromIndex} is greater than {@code toIndex}, the search is * If {@code fromIndex} is greater than {@code toIndex}, the search is
* performed in a reversed order. * performed in a reversed order from {@code fromIndex} (exclusive)
* down to {@code toIndex} (inclusive).
* <p>
* Note that the lower index is always included and higher always excluded.
* <p> * <p>
* This method does not modify {@code readerIndex} or {@code writerIndex} of * This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer. * this buffer.