From 05d5ad90c053962b2423837e7e5276aec1a5f655 Mon Sep 17 00:00:00 2001 From: remm Date: Tue, 10 Dec 2024 13:32:49 +0100 Subject: [PATCH] Add javadoc about the warning --- java/org/apache/tomcat/util/buf/ByteBufferUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/org/apache/tomcat/util/buf/ByteBufferUtils.java b/java/org/apache/tomcat/util/buf/ByteBufferUtils.java index 552ce94c3a35..6ae744db2a15 100644 --- a/java/org/apache/tomcat/util/buf/ByteBufferUtils.java +++ b/java/org/apache/tomcat/util/buf/ByteBufferUtils.java @@ -94,6 +94,10 @@ public static ByteBuffer expand(ByteBuffer in, int newSize) { return out; } + /** + * Clean specified direct buffer. This will cause an unavoidable warning on Java 24 and newer. + * @param buf the buffer to clean + */ public static void cleanDirectBuffer(ByteBuffer buf) { if (invokeCleanerMethod != null) { try {