[jdk17u-dev] RFR: 8313815: The exception messages printed by jcmd ManagementAgent.start are corrupted on Japanese Windows
Chris Plummer
cjplummer at openjdk.org
Tue Aug 8 19:25:43 UTC 2023
On Mon, 7 Aug 2023 00:48:11 GMT, Kimura Yukihiro <duke at openjdk.org> wrote:
> I would like to fix this issue
> because users can not read the exception message of jcmd ManagementAgent on localized Windows platform and can not understand what happened.
> Testing:
> all serviceability area tests jdk_svc, and a specific test to verify the fix.
>
> Could anyone review the fix please?
>
> Thanks,
> Kimura Yukihiro
We have the following in agent.properties:
agent.err.invalid.state = Invalid agent state: {0}
and it is used by:
public static final String INVALID_STATE =
"agent.err.invalid.state";
throw new RuntimeException(getText(INVALID_STATE, "Agent already started"));
Shouldn't "Agent already started" also be text that we should localize in the properties files? If we did, I think this issue would go away. Since the above is the only reference to INVALID_STATE, we could just instead have:
agent.err.invalid.state = Invalid agent state: Agent already started
-------------
PR Comment: https://git.openjdk.org/jdk17u-dev/pull/1641#issuecomment-1670166936
More information about the jdk-updates-dev
mailing list