[jdk8u-dev] RFR: 8295982: Failure in sun/security/tools/keytool/WeakAlg.java - ks: The process cannot access the file because it is being used by another process
Roman Marchenko
rmarchenko at openjdk.org
Sat Oct 29 21:33:50 UTC 2022
Test sun/security/tools/keytool/WeakAlg.java occasionally fails on Windows 64 bit (win2016, win11) with the following message "java.nio.file.FileSystemException: ks: The process cannot access the file because it is being used by another process".
The root cause of the problem is "ks" file is still open by FileInputStream instance used by KeyStore in the test code. Perhaps, forcing GC to run may avoid this issue, but I guess explicit closing of the input stream is more suitable here.
No regression, only the test code is changed.
The test passes on Windows and Linux now.
-------------
Commit messages:
- Forcing closing of input streams
Changes: https://git.openjdk.org/jdk8u-dev/pull/150/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=150&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8295982
Stats: 9 lines in 1 file changed: 6 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/150.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev pull/150/head:pull/150
PR: https://git.openjdk.org/jdk8u-dev/pull/150
More information about the jdk8u-dev
mailing list