RFR: 8332287: When printing arguments in error logs, quote arguments with whitespaces [v2]
Kevin Walls
kevinw at openjdk.org
Fri May 17 14:25:03 UTC 2024
On Fri, 17 May 2024 14:14:10 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> But how would I know the original?
I don't think you can. 8-) That may be why it's currently done as it is, if the quote placement is lost we just can't put it back and know it was correct.
This next one may be a bit artificial, but we should also at least acknowledge the case where an argument has an embedded quote character, e.g. escaped with a backslash before I type it. There might be an XX or other option where that could apply at some point. You don't get a String you can paste, unless we escape quotes when printing in print_jvm_args_on(). And we don't want to make that much more complicated. We can either print the escape \ before any quotes, or just note in the bug that this is not always a trivial problem, although it is trivial for many cases.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19248#issuecomment-2117723545
More information about the hotspot-runtime-dev
mailing list