8286855: javac error on invalid jar should only print filename

Reviewed-by: jpai, mdoerr
This commit is contained in:
Christoph Langer 2022-05-30 15:01:17 +00:00
parent f086d945c3
commit 1606d5545b

View File

@ -564,7 +564,7 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil
try {
this.fileSystem = jarFSProvider.newFileSystem(archivePath, env);
} catch (ZipException ze) {
throw new IOException("ZipException opening \"" + archivePath + "\": " + ze.getMessage(), ze);
throw new IOException("ZipException opening \"" + archivePath.getFileName() + "\": " + ze.getMessage(), ze);
}
} else {
this.fileSystem = FileSystems.newFileSystem(archivePath, (ClassLoader)null);