From 2fd54837f0d1277d18799b540add1e06e7886f3a Mon Sep 17 00:00:00 2001 From: keemsisi Date: Mon, 15 Sep 2025 03:13:49 +0100 Subject: [PATCH] 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 --- .../apache/kafka/storage/internals/log/AbstractIndex.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java b/storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java index b1475884e3a..7e7c3e1cc63 100644 --- a/storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java +++ b/storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java @@ -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);