RFR: 8253872: ArgumentHandler must use the same delimiters as in jvmti_tools.cpp
Igor Ignatyev
iignatyev at openjdk.java.net
Wed Sep 30 18:54:45 UTC 2020
separating the commit from #370 / [8252003](https://bugs.openjdk.java.net/browse/JDK-8253872)[[1]]
jvmti_tools.cpp supports ` `, `~` and/or `,` as delimiters[[2]] in -agentlib options, but
`nsk/share/jvmti/ArgumentHandler` takes these options (via `getAgentOptionsString`) and then parse in
`parseOptionString`, where `StringTokenizer` is used w/ default delimiters, ie `\t\n\r\f`, and as a result, it doesn't
split options correctly in tests which use delimiters other than ` `. and in fact,
`nsk/jvmti/scenarios/contention/TC05/tc05t001` is using `,` and gets wrong options/values.
testing: ✅ `nsk/jvmti/scenarios/contention/TC05/tc05t001`
[1]: https://github.com/openjdk/jdk/pull/370/commits/5219b11650c00f9af5564758b3292458a48e7f21#r497658983
[2]: https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp#L224
-------------
Commit messages:
- 8253872: ArgumentHandler must use the same delimiters as in jvmti_tools.cpp
Changes: https://git.openjdk.java.net/jdk/pull/438/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=438&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253872
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/438.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/438/head:pull/438
PR: https://git.openjdk.java.net/jdk/pull/438
More information about the serviceability-dev
mailing list