HADOOP-17972. Backport HADOOP-17683 for branch-3.2 (#3573)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit df9c07fc04)
This commit is contained in:
Ananya Singh 2021-10-28 08:16:12 +05:30 committed by Akira Ajisaka
parent 6ecaa0ac8b
commit 0a51b7fd11
2 changed files with 7 additions and 13 deletions

View File

@ -601,15 +601,9 @@ public class FileUtil {
} else {
File[] allFiles = dir.listFiles();
if (allFiles != null) {
for (int i = 0; i < allFiles.length; i++) {
boolean isSymLink;
try {
isSymLink = org.apache.commons.io.FileUtils.isSymlink(allFiles[i]);
} catch(IOException ioe) {
isSymLink = true;
}
if(!isSymLink) {
size += getDU(allFiles[i]);
for (File f : allFiles) {
if (!org.apache.commons.io.FileUtils.isSymlink(f)) {
size += getDU(f);
}
}
}

View File

@ -110,7 +110,7 @@
<commons-collections.version>3.2.2</commons-collections.version>
<commons-compress.version>1.21</commons-compress.version>
<commons-csv.version>1.0</commons-csv.version>
<commons-io.version>2.5</commons-io.version>
<commons-io.version>2.8.0</commons-io.version>
<commons-lang3.version>3.7</commons-lang3.version>
<commons-logging.version>1.1.3</commons-logging.version>
<commons-logging-api.version>1.1</commons-logging-api.version>