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

Ivan Ponomarev duke at openjdk.org
Sun Sep 25 07:08:38 UTC 2022


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

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

reimplemented the class from scratch

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

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


More information about the jol-dev mailing list