RFR: 8200610: Compiling fails with java.nio.file.ReadOnlyFileSystemException [v2]
Archie L. Cobbs
duke at openjdk.org
Thu Dec 8 02:22:30 UTC 2022
On Thu, 8 Dec 2022 00:18:36 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Archie L. Cobbs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8200610
>> - Catch and report some java.nio.file.* exceptions along with IOException.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java line 1643:
>
>> 1641: if (results != null && file != null)
>> 1642: results.add(file);
>> 1643: } catch (IOException | FileSystemNotFoundException | InvalidPathException | ReadOnlyFileSystemException ex) {
>
> If we're hypothesizing plausible unchecked exceptions, maybe consider adding `UncheckedIOException` ?
>
> I'd also recommend one exception per line, breaking the line before the `|`
>
>
> } catch (IOException
> | FileSystemNotFoundException
> | InvalidPathException
> | ReadOnlyFileSystemException
> | UncheckedIOException ex) {
Perfect - thanks.
-------------
PR: https://git.openjdk.org/jdk/pull/10818
More information about the compiler-dev
mailing list