mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8349383: (fs) FileTreeWalker.next() superfluous null check of visit() return value
Reviewed-by: djelinski
This commit is contained in:
parent
379c3f9966
commit
b499c827a5
1 changed files with 31 additions and 37 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -319,8 +319,6 @@ class FileTreeWalker implements Closeable {
|
||||||
return null; // stack is empty, we are done
|
return null; // stack is empty, we are done
|
||||||
|
|
||||||
// continue iteration of the directory at the top of the stack
|
// continue iteration of the directory at the top of the stack
|
||||||
Event ev;
|
|
||||||
do {
|
|
||||||
Path entry = null;
|
Path entry = null;
|
||||||
IOException ioe = null;
|
IOException ioe = null;
|
||||||
|
|
||||||
|
@ -353,12 +351,8 @@ class FileTreeWalker implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// visit the entry
|
// visit the entry
|
||||||
ev = visit(entry,
|
return visit(entry,
|
||||||
true); // canUseCached
|
true); // canUseCached
|
||||||
|
|
||||||
} while (ev == null);
|
|
||||||
|
|
||||||
return ev;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue