On Wed, 6 May 2026 09:44:27 GMT, Benjamin Peterson <[email protected]> wrote:
> The condition to bound output length was inverted. > > > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). An oversight in the original implementation. Not noticed as specifying the file name as "-" is not documented and the 1-arg write is probably never used (This code will go away if/when JDK-8336723 is implemented and a supported/documented means to write the thread dump to stdout is added) src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java line 606: > 604: @Override > 605: public void write(int b) { > 606: if (max > count) { Might be mildly better to use `if (count < max)`. ------------- PR Review: https://git.openjdk.org/jdk/pull/31056#pullrequestreview-4235498457 PR Review Comment: https://git.openjdk.org/jdk/pull/31056#discussion_r3194917837
