mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-23 16:55:09 +00:00
7127235: (fs) NPE in Files.walkFileTree if cached attributes are GC'ed
Reviewed-by: forax, chegar
This commit is contained in:
parent
d1c86caeaa
commit
5fa281c0ee
@ -92,7 +92,7 @@ class FileTreeWalker {
|
||||
(System.getSecurityManager() == null))
|
||||
{
|
||||
BasicFileAttributes cached = ((BasicFileAttributesHolder)file).get();
|
||||
if (!followLinks || !cached.isSymbolicLink())
|
||||
if (cached != null && (!followLinks || !cached.isSymbolicLink()))
|
||||
attrs = cached;
|
||||
}
|
||||
IOException exc = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user