RFR: 8341495: JShell crashes with java.util.MissingFormatArgumentException [v7]
Jan Lahoda
jlahoda at openjdk.org
Wed Dec 4 16:15:42 UTC 2024
On Mon, 2 Dec 2024 15:47:59 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> JShell prints some of its output using `printf()` formatted strings. However, there are a few spots where a string `str` to be printed is passed directly as a format string like `format(str)` instead of indirectly like `format("%s", str)`, even though the string `str` contains unknown or arbitrary content outside of JShell's control. As a result, JShell can crash suddenly with a `MissingFormatArgumentException` or similar exception if the string `str` happens to contain a `%` format specifier, etc.
>>
>> Please review this patch which attempts to fix the places where an unknown string is passed directly as a format string.
>
> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert changes to non-English properties files per review suggestion.
Looks good to me. Thanks!
-------------
Marked as reviewed by jlahoda (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21339#pullrequestreview-2479237133
More information about the kulla-dev
mailing list