RFR: 8330532: Improve line-oriented text parsing in HotSpot
Ioi Lam
iklam at openjdk.org
Tue Apr 23 00:17:28 UTC 2024
On Mon, 22 Apr 2024 19:55:39 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> src/hotspot/share/cds/classListParser.cpp line 436:
>>
>>> 434: }
>>> 435:
>>> 436: void ClassListParser::check_class_name(const char* class_name) {
>>
>> Did we not already have code to check the length of the class name for the class list parser? There's similar code in systemDictionary.
>
> There is `SystemDictionary::class_name_symbol()` which checks if a class name is valid but it creates a new symbol instead of solely checking the name. Maybe it's worth abstracting the check into its own method and using it here and in SystemDictionary?
`SystemDictionary::class_name_symbol()` assumes that the input is UTF8, but I cannot make that assumption here, as the `class_name` comes from a text file that can have arbitrary content.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1575489524
More information about the hotspot-dev
mailing list