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))
|
(System.getSecurityManager() == null))
|
||||||
{
|
{
|
||||||
BasicFileAttributes cached = ((BasicFileAttributesHolder)file).get();
|
BasicFileAttributes cached = ((BasicFileAttributesHolder)file).get();
|
||||||
if (!followLinks || !cached.isSymbolicLink())
|
if (cached != null && (!followLinks || !cached.isSymbolicLink()))
|
||||||
attrs = cached;
|
attrs = cached;
|
||||||
}
|
}
|
||||||
IOException exc = null;
|
IOException exc = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user