From db73026a35b9a6ec42f883191af0c2458c52f13b Mon Sep 17 00:00:00 2001 From: Niels Kootstra <545768+nkootstra@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:35:17 +0200 Subject: [PATCH] docs(ssm): match BoundedOutputCollector Javadoc to its write path (#4297) The class Javadoc said bytes after the cap are decoded and discarded, but write returns before decoding once the cap is reached. Describe what the code does. --- .../floci/services/ssm/BoundedOutputCollector.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/hectorvent/floci/services/ssm/BoundedOutputCollector.java b/src/main/java/io/github/hectorvent/floci/services/ssm/BoundedOutputCollector.java index 8ba4f6b559..40d3bcef64 100644 --- a/src/main/java/io/github/hectorvent/floci/services/ssm/BoundedOutputCollector.java +++ b/src/main/java/io/github/hectorvent/floci/services/ssm/BoundedOutputCollector.java @@ -8,8 +8,9 @@ import java.nio.charset.StandardCharsets; /** * Accumulates UTF-8 bytes into a character buffer bounded to a maximum number of characters. - * Bytes received after the cap is reached are decoded and discarded rather than retained, so - * memory stays proportional to {@code maxChars} regardless of how much input is fed in. + * Once the cap is reached, later {@link #write(byte[])} calls return without decoding their + * bytes, so memory stays proportional to {@code maxChars} regardless of how much input is fed + * in. Callers can keep writing after the cap to drain their source stream. * *
Handles a multi-byte UTF-8 character split across separate {@link #write(byte[])} calls * (e.g. Docker exec stream frames) by carrying any undecoded trailing bytes over to the next