From cf4e59f3f6b97708eaae604c2e0338054922cec5 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Thu, 15 Jan 2026 14:36:46 +0100 Subject: [PATCH] Use the @return inline tag --- src/java.base/share/classes/java/lang/String.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/lang/String.java b/src/java.base/share/classes/java/lang/String.java index 06a17de5e4c..3d6ceaac483 100644 --- a/src/java.base/share/classes/java/lang/String.java +++ b/src/java.base/share/classes/java/lang/String.java @@ -2130,14 +2130,13 @@ public final class String } /** - * Returns the length in bytes of the given String encoded with the given {@link Charset}. + * {@return the length in bytes of the given String encoded with the given {@link Charset}} * *

The result will be the same value as {@code getBytes(charset).length}. * * @implNote This method may allocate memory to compute the length for some charsets. * * @param cs the {@link Charset} used to the compute the length - * @return the length in bytes of the given String encoded with the given {@link Charset} * @since 27 */ public int getBytesLength(Charset cs) {