RFR: CODETOOLS-7903176: Move LJV inside JOL [v2]

Aleksey Shipilev shade at openjdk.org
Mon Aug 22 09:41:57 UTC 2022


On Mon, 22 Aug 2022 08:39:59 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Ivan Ponomarev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update copyright notice, lint
>
> jol-core/src/test/java/org/openjdk/jol/ljv/HashCodeCollision.java line 9:
> 
>> 7:  * @author Ilya Selivanov
>> 8:  */
>> 9: public class HashCodeCollision {
> 
> This file has a mix of identifier styles: `alphabet_list`, for example, should be `alphabetList`.

There is also seem to be an easier way to generated hashcode collisions on Strings: just take any string, and add `Aa` and `BB` to it to produce different strings with the same hashcode:


jshell> "seedAa".hashCode()
$9 ==> -906232207

jshell> "seedBB".hashCode()
$10 ==> -906232207


Repeat if you need more strings like these.

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

PR: https://git.openjdk.org/jol/pull/24


More information about the jol-dev mailing list