On Wed, 18 Oct 2023 10:09:29 GMT, Sean Coffey <coff...@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:
> 
>   Testcase feedback from Lance

src/java.base/share/classes/java/util/zip/ZipFile.java line 1415:

> 1413:                  * an existing file is updated. The other hash code 
> properties
> 1414:                  * by themselves won't detect such a change.
> 1415:                  */

I see you've added a comment to the checking of the last modified time but I 
think the comment is a bit confusing as there isn't any detection of a changed 
zip file in the hashCode/equals methods.  I think you want to say that the 
lastModifiedTime is included in the hash code to allow for cases where the same 
file is opened more than once and where it has been modified in the mean-time.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16115#discussion_r1363754433

Reply via email to