8286855: javac error on invalid jar should only print filename

Backport-of: 1606d5545b8daad840575b7cfd97b94fd8a3d41d
This commit is contained in:
Christoph Langer 2022-06-01 17:56:05 +00:00
parent 81f41c60b2
commit 7aecf43243

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);