diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
index 7b8a05fc268..fe7b3eb8af7 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
@@ -600,18 +600,12 @@ public class FileUtil {
return dir.length();
} 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]);
- }
- }
+ if (allFiles != null) {
+ for (File f : allFiles) {
+ if (!org.apache.commons.io.FileUtils.isSymlink(f)) {
+ size += getDU(f);
+ }
+ }
}
return size;
}
diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
index 388e2a67a4d..0c1ad0b86e3 100644
--- a/hadoop-project/pom.xml
+++ b/hadoop-project/pom.xml
@@ -110,7 +110,7 @@
3.2.2
1.21
1.0
- 2.5
+ 2.8.0
3.7
1.1.3
1.1