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

Reviewed-by: vromero
This commit is contained in:
Archie L. Cobbs 2023-01-04 17:32:33 +00:00 committed by Vicente Romero
parent df1caf9081
commit b9758d2201

View File

@ -26,6 +26,9 @@
package com.sun.tools.javac.main;
import java.io.*;
import java.nio.file.FileSystemNotFoundException;
import java.nio.file.InvalidPathException;
import java.nio.file.ReadOnlyFileSystemException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@ -1682,7 +1685,11 @@ public class JavaCompiler {
}
if (results != null && file != null)
results.add(file);
} catch (IOException ex) {
} catch (IOException
| UncheckedIOException
| FileSystemNotFoundException
| InvalidPathException
| ReadOnlyFileSystemException ex) {
log.error(cdef.pos(),
Errors.ClassCantWrite(cdef.sym, ex.getMessage()));
return;