On Thu, 11 Nov 2021 12:50:30 GMT, Claes Redestad <redes...@openjdk.org> wrote:

>> 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```

I just tweaked the comment slightly

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

PR: https://git.openjdk.java.net/jdk/pull/6342

Reply via email to