MINOR: Update on fixing tag description missing in javadoc (#20380)

* Added tag description to @throws in method javadoc
* Added explicit throws IndexOffsetOverflowException to method signature

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
keemsisi 2025-09-15 03:13:49 +01:00 committed by GitHub
parent a9e529236f
commit 2fd54837f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -301,8 +301,12 @@ public abstract class AbstractIndex implements Closeable {
}
/**
* Get offset relative to base offset of this index
* @throws IndexOffsetOverflowException
* Gets the offset relative to the {@code baseOffset} of this index.
*
* @param offset the absolute offset to be converted into a relative offset from {@code baseOffset}
* @return the relative offset as an {@code int}
* @throws IndexOffsetOverflowException if the input offset is lesser than the base offset
* or if the relative offset exceeds {@link Integer#MAX_VALUE}
*/
public int relativeOffset(long offset) {
OptionalInt relativeOffset = toRelative(offset);