Skip to content

Commit 94f36b1

Browse files
restore JavaCompiler error change
1 parent c441621 commit 94f36b1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,16 +1756,12 @@ public void generate(Queue<Pair<Env<AttrContext>, JCClassDecl>> queue, Queue<Jav
17561756
if (results != null && file != null)
17571757
results.add(file);
17581758
} catch (IOException
1759-
| UncheckedIOException
1760-
| FileSystemNotFoundException
1761-
| InvalidPathException
1762-
| ReadOnlyFileSystemException ex) {
1763-
String msg = ex.getMessage();
1764-
if (msg == null || msg.isEmpty()) {
1765-
msg = ex.getClass().getSimpleName();
1766-
}
1759+
| UncheckedIOException
1760+
| FileSystemNotFoundException
1761+
| InvalidPathException
1762+
| ReadOnlyFileSystemException ex) {
17671763
log.error(cdef.pos(),
1768-
Errors.ClassCantWrite(cdef.sym, msg));
1764+
Errors.ClassCantWrite(cdef.sym, ex.getMessage()));
17691765
return;
17701766
} finally {
17711767
log.useSource(prev);

0 commit comments

Comments
 (0)