RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v10]
Jaikiran Pai
jpai at openjdk.org
Mon Oct 23 13:31:38 UTC 2023
On Mon, 23 Oct 2023 13:04:20 GMT, Sean Coffey <coffeys at openjdk.org> wrote:
>> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source objects aren't created for the same zip file.
>
> Sean Coffey has updated the pull request incrementally with one additional commit since the last revision:
>
> Incorporate test review comments from Jai
Thank you for the updates, Sean. The test `ZipSourceCache` looks good to me in its current form. I have no other review comments except for the jmh benchmark. I'll approve this PR in its current form.
As for the jmh benchmark, the existing benchmark method has some informative inline comment explaining what it does. Perhaps we should have something similar for this new benchmark method explaining why it is there? It currently says "// Ensure that we only create ZipFile.Source.Key entry per unique zip file" which doesn't seem accurate considering that this is a benchmark method and doesn't have any verifications of Key counts.
I'll read up a bit more about jmh tomorrow because I'm unsure how multiple `@Benchmark` methods within a single class are run and what all those annotations mean when it comes to state management and such. But you don't have to wait for my approval of that part. If anyone else approves this in the meantime, please go ahead with your integration.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16115#issuecomment-1775197122
More information about the core-libs-dev
mailing list