RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v11]

Eirik Bjorsnos duke at openjdk.org
Wed Dec 13 21:10:53 UTC 2023


On Mon, 23 Oct 2023 16:12:45 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:
> 
>   Update jmh test comments

I noticed the ZipSourceCache test fail on GHA on windows-x64:


FAILED     ZipSourceCache::testKeySourceMapping 'testKeySourceMapping()'
java.nio.file.FileSystemException: 1702471080605-bug8317678.zip: The process cannot access the file because it is being used by another process
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:273)
	at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:109)
	at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
	at ZipSourceCache.cleanup(ZipSourceCache.java:65)


On a re-run of the jobs, the test ran green again on the same source. So this seems timing related.

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

PR Comment: https://git.openjdk.org/jdk/pull/16115#issuecomment-1854702162


More information about the core-libs-dev mailing list