{"record":{"id":"6e201283a2c228b7","repo":"apache/hadoop","slug":"invalid-empty-argument","errorCode":null,"errorMessage":"Invalid empty argument","messagePattern":"Invalid empty argument","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/NumberExpression.java","lineNumber":86,"sourceCode":"    this.mode = mode;\n  }\n\n  @Override\n  public void prepare() throws IOException {\n    parseArgument(getArgument(1));\n  }\n\n  /**\n   * Parse the argument string to extract the numeric argument.\n   *\n   * @param arg String to be parsed\n   * @throws IllegalArgumentException if there is a problem parsing the argument\n   */\n  protected void parseArgument(String arg) throws IllegalArgumentException {\n    if (arg == null) {\n      throw new IllegalArgumentException(\"Invalid null argument\");\n    } else if (arg.isEmpty()) {\n      throw new IllegalArgumentException(\"Invalid empty argument\");\n    }\n    switch (mode) {\n    case ROUND_UP:\n      if (arg.startsWith(\"+\")) {\n        min = (Long.parseLong(arg.substring(1)) * units) + 1L;\n      } else if (arg.startsWith(\"-\")) {\n        max = (Long.parseLong(arg.substring(1)) * units) - units;\n      } else {\n        max = Long.parseLong(arg) * units;\n        min = max - units + 1L;\n      }\n      break;\n    case ROUND_DOWN:\n      if (arg.startsWith(\"+\")) {\n        min = (Long.parseLong(arg.substring(1)) * units) + units;\n      } else if (arg.startsWith(\"-\")) {\n        max = (Long.parseLong(arg.substring(1)) * units) - 1L;\n      } else {","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/NumberExpression.java#L68-L104","documentation":"Error \"Invalid empty argument\" thrown in apache/hadoop.","triggerScenarios":"Thrown by find numeric expressions (e.g. -size, -mtime) when an empty string is passed where a number is required.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty numeric argument for the find expression.","Check the command line for an empty value after the operator."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}