{"record":{"id":"ae35f4df1695f20a","repo":"apache/hadoop","slug":"invalid-null-argument-ae35f4","errorCode":null,"errorMessage":"Invalid null argument","messagePattern":"Invalid null argument","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/Perm.java","lineNumber":68,"sourceCode":"    setUsage(USAGE);\n    setHelp(HELP);\n  }\n\n  @Override\n  public void prepare() throws IOException {\n    parseArgument(getArgument(1));\n  }\n\n  /**\n   * Parse an argument string to build the permission mask.\n   *\n   * @param argument String to be parsed\n   * @throws IllegalArgumentException if the argument is invalid\n   */\n  private void parseArgument(String argument) throws IllegalArgumentException {\n    String arg = argument;\n    if (arg == null) {\n      throw new IllegalArgumentException(\"Invalid null argument\");\n    }\n    if (arg.isEmpty()) {\n      throw new IllegalArgumentException(\"Invalid empty argument\");\n    }\n    if (arg.startsWith(\"-\")) {\n      mask = true;\n      arg = arg.substring(1);\n    }\n    if (Character.isDigit(arg.charAt(0))) {\n      // the argument is a numeric mode\n      permission = new FsPermission(arg).toShort();\n    } else {\n      // the argument is a symbolic mode\n      for (String part : arg.split(\",\")) {\n        int shift;\n        Operator operator = null;\n        int value = 0;\n        int position = 0;","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/find/Perm.java#L50-L86","documentation":"Error \"Invalid null argument\" thrown in apache/hadoop.","triggerScenarios":"Thrown by the find -perm expression when a null argument is passed where a permission mode is required.","commonSituations":"See trigger scenarios.","solutions":["Provide a permission argument to the -perm expression (octal or symbolic).","Check that the -perm operand is present and not null."],"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"}