On Thu, 11 Nov 2021 12:25:38 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> Hi Jaikiran, >> >> The comment is correct > > Thank you for that clarification. The "addSlash" param being "false" in the > call below that comment is what made me think that the comment had a typo. I > read that code in a bit more detail now and I see what that comment means. It > essentially says that it's now issuing a call to find a entry position (if it > exists) for the name ending with a "/" character. The comment is a bit too fuzzy. What's happening here is we searched for `foo` and found a match for `foo/` - but we can't be sure there's no exact entry `foo` later on in the hash bucket, so we (somewhat inefficiently) redo the search for `foo` without the trailing slash parameter. I suggest clarifying to something like this: ``` // name + "/" entry found, keep looking for and prefer an entry which exactly matches name``` ------------- PR: https://git.openjdk.java.net/jdk/pull/6342