8286444: javac errors after JDK-8251329 are not helpful enough to find root cause
Reviewed-by: mdoerr
This commit is contained in:
parent
9eb15c9b10
commit
29c4b8e80d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,6 +63,7 @@ import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.zip.ZipException;
|
||||
|
||||
import javax.lang.model.SourceVersion;
|
||||
import javax.tools.FileObject;
|
||||
@ -560,7 +561,11 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil
|
||||
Map<String,String> env = Collections.singletonMap("multi-release", multiReleaseValue);
|
||||
FileSystemProvider jarFSProvider = fsInfo.getJarFSProvider();
|
||||
Assert.checkNonNull(jarFSProvider, "should have been caught before!");
|
||||
this.fileSystem = jarFSProvider.newFileSystem(archivePath, env);
|
||||
try {
|
||||
this.fileSystem = jarFSProvider.newFileSystem(archivePath, env);
|
||||
} catch (ZipException ze) {
|
||||
throw new IOException("ZipException opening \"" + archivePath + "\": " + ze.getMessage(), ze);
|
||||
}
|
||||
} else {
|
||||
this.fileSystem = FileSystems.newFileSystem(archivePath, (ClassLoader)null);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user