<div dir="ltr"><div dir="ltr">Could you review this fix to make the error message more user friendly, please?<br></div><div dir="ltr"><br></div><div>Regards,</div><div>Chihiro</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2022年6月28日(火) 15:55 Chihiro Ito <<a href="mailto:cito@openjdk.org">cito@openjdk.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Could I have a review of PR that fixes incorrect error messages regarding of recording.<br>
<br>
The current message is very confusing. If a user types jcmd <pid> JFR.start name=abc name=def or java --XX:StartFlightRecording=name=abc,name=def, the error message says "Duplicates in diagnostic command arguments", but doesn't know what options are duplicated.<br>
Furthermore, if a user specifies two or three duplicate parameters, the same logs will be output.<br>
<br>
It should say follows,<br>
Option name can only be specified once with starting flight recording<br>
Options name and disk can only be specified once with starting flight recording<br>
Options name, disk and maxage can only be specified once with starting flight recording<br>
This problem affects --XX:StartFlightRecording, jcmd JFR.start, JFR.stop, JFR.dump, JFR.check, and MBean.<br>
<br>
For other than start, the output is as follows, (example of dump)<br>
Option name can only be specified once with dumping flight recording<br>
<br>
Testing: jdk/jdk/jfr<br>
<br>
Thanks<br>
Chihiro<br>
<br>
-------------<br>
<br>
Commit messages:<br>
- modify whitespace from windows to linux<br>
- modify copyright<br>
- Modify log message and test case<br>
- JDK-8288783 Initial<br>
<br>
Changes: <a href="https://git.openjdk.org/jdk/pull/9302/files" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/9302/files</a><br>
Webrev: <a href="https://webrevs.openjdk.org/?repo=jdk&pr=9302&range=00" rel="noreferrer" target="_blank">https://webrevs.openjdk.org/?repo=jdk&pr=9302&range=00</a><br>
Issue: <a href="https://bugs.openjdk.org/browse/JDK-8288783" rel="noreferrer" target="_blank">https://bugs.openjdk.org/browse/JDK-8288783</a><br>
Stats: 442 lines in 10 files changed: 431 ins; 2 del; 9 mod<br>
Patch: <a href="https://git.openjdk.org/jdk/pull/9302.diff" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/9302.diff</a><br>
Fetch: git fetch <a href="https://git.openjdk.org/jdk" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk</a> pull/9302/head:pull/9302<br>
<br>
PR: <a href="https://git.openjdk.org/jdk/pull/9302" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/9302</a><br>
</blockquote></div></div>