apache/hadoop · error · IllegalArgumentException
Invalid null argument
Error message
Invalid null argument
What it means
Error "Invalid null argument" thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/NumberExpression.java:84
protected void setMode(MODE mode) {
this.mode = mode;
}
@Override
public void prepare() throws IOException {
parseArgument(getArgument(1));
}
/**
* Parse the argument string to extract the numeric argument.
*
* @param arg String to be parsed
* @throws IllegalArgumentException if there is a problem parsing the argument
*/
protected void parseArgument(String arg) throws IllegalArgumentException {
if (arg == null) {
throw new IllegalArgumentException("Invalid null argument");
} else if (arg.isEmpty()) {
throw new IllegalArgumentException("Invalid empty argument");
}
switch (mode) {
case ROUND_UP:
if (arg.startsWith("+")) {
min = (Long.parseLong(arg.substring(1)) * units) + 1L;
} else if (arg.startsWith("-")) {
max = (Long.parseLong(arg.substring(1)) * units) - units;
} else {
max = Long.parseLong(arg) * units;
min = max - units + 1L;
}
break;
case ROUND_DOWN:
if (arg.startsWith("+")) {
min = (Long.parseLong(arg.substring(1)) * units) + units;
} else if (arg.startsWith("-")) {View on GitHub (pinned to 2add963021)
Solutions
- Provide a numeric argument for the find numeric expression (e.g. -size, -mtime).
- Check that the argument is not null before parsing.
When it happens
Trigger: Thrown by find numeric expressions (e.g. -size, -mtime) when a null argument is passed where a number is required.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/1b34501868300d25.
Report an issue: GitHub.