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…
Reference in New Issue
Block a user