RFR: 8299234: JMX Repository.query performance [v2]

Alexey Bakhtin abakhtin at openjdk.org
Wed Jan 11 14:11:54 UTC 2023


On Wed, 11 Jan 2023 12:02:57 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use copy of the ObjectName for matching
>
> src/java.management/share/classes/javax/management/ObjectName.java line 2024:
> 
>> 2022:             // The other ObjectName is the string.
>> 2023:             return Util.wildmatch(name._canonicalName, _canonicalName,
>> 2024:                    0, 0, name.getDomainLength(), getDomainLength());
> 
> This looks wrong. Look at the parameters in wildmatch: 
> 
> wildmatch(final String str, final String pat,
>                    int stri, final int strend, int pati, final int patend)
> 
> 
> What tests did you run to validate your changes? If none of the ObjectName tests fail with your changes you will need to add a new test that catches the error.

Thank you again for review and finding.
Current tests do not catch such issue, so I extended ApplyWildcardTest.java with domain patterns. The test passed on the original and new code, fails with incorrect Util.wildmatch parameters

-------------

PR: https://git.openjdk.org/jdk/pull/11758


More information about the serviceability-dev mailing list