Skip to content

Commit c905fab

Browse files
Fix NPE in Find.java
1 parent 56c7ada commit c905fab

File tree

1 file changed

+3
-1
lines changed
  • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find

1 file changed

+3
-1
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/Find.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ private static String buildDescription(ExpressionFactory factory) {
114114
if (expr.isOperator()) {
115115
operators.add(expr);
116116
} else {
117-
primaries.add(expr);
117+
if (expr != null) {
118+
primaries.add(expr);
119+
}
118120
}
119121
}
120122
Collections.sort(operators, new Comparator<Expression>() {

0 commit comments

Comments
 (0)