From 13a7dc98476fce9a3ac989ca9526a5e12da18400 Mon Sep 17 00:00:00 2001 From: Pramithas Dhakal Date: Thu, 23 Jan 2025 16:24:45 +0545 Subject: [PATCH] MINOR: Make `forceUnmap` method protected (#18638) Reviewers: Divij Vaidya --- .../org/apache/kafka/storage/internals/log/AbstractIndex.java | 4 ++-- 1 file changed, 2 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 9c7c645c4a705..bf1bd802f5e0c 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 @@ -399,8 +399,8 @@ protected void safeForceUnmap() { /** * Forcefully free the buffer's mmap. */ - // Visible for testing, we can make this protected once OffsetIndexTest is in the same package as this class - public void forceUnmap() throws IOException { + // Visible for testing + protected void forceUnmap() throws IOException { try { ByteBufferUnmapper.unmap(file.getAbsolutePath(), mmap); } finally {