Several methods on java.lang.module.ModuleReader are specified to thrown an IOException if invoked after the reader was closed:
> @throws IOException If an I/O error occurs or the module reader is closed
jdk.internal.module.ModulePatcher$PatchedModuleReader is an (internal) implementation of ModuleReader. Some of its methods throw an unspecified IllegalStateException when invoked after being closed:
Caused by: java.lang.IllegalStateException: zip file closed
at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:827)
at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:290)
at java.base/java.util.jar.JarFile.getEntry(JarFile.java:505)
at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:460)
at java.base/jdk.internal.module.ModulePatcher$JarResourceFinder.find(ModulePatcher.java:444)
at java.base/jdk.internal.module.ModulePatcher$PatchedModuleReader.findResourceInPatch(ModulePatcher.java:301)
at java.base/jdk.internal.module.ModulePatcher$PatchedModuleReader.find(ModulePatcher.java:357)