Integrated: 8200610: Compiling fails with java.nio.file.ReadOnlyFileSystemException

Archie L. Cobbs duke at
Wed Jan 4 17:35:55 UTC 2023

On Fri, 21 Oct 2022 15:33:22 GMT, Archie L. Cobbs <duke at> wrote:

> In `JavaCompiler`, when trying to write a class file, if an `IOException`s is thrown, instead of crashing, we report a normal error" `error while writing [file]: ...`.
> However there are some I/O errors that can generate `RuntimeException`s not caught by this logic. So instead these errors cause a compiler crash.
> An example is given in JDK-8200610, where the compiler tries to write into a ZIP file system and a `java.nio.file.ReadOnlyFileSystemException` is thrown.
> This patch adds that exception and a couple of others which (in my estimation) could reasonably be expected to be thrown in various obscure cases involving alternative file systems: `FileSystemNotFoundException` and `InvalidPathException`.
> Any suggestions on what the most appropriate list of exception types to include here are appreciated.

This pull request has now been integrated.

Changeset: b9758d22
Author:    Archie L. Cobbs <archie.cobbs at>
Committer: Vicente Romero <vromero at>
Stats:     8 lines in 1 file changed: 7 ins; 0 del; 1 mod

8200610: Compiling fails with java.nio.file.ReadOnlyFileSystemException

Reviewed-by: vromero



More information about the compiler-dev mailing list