{"record":{"id":"71c0fa51b06d1b4a","repo":"apache/hadoop","slug":"collection-key-may-not-be-null","errorCode":null,"errorMessage":"Collection<Key> may not be null","messagePattern":"Collection<Key> may not be null","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/Filter.java","lineNumber":174,"sourceCode":"   * @param keys The list of keys.\n   */\n  public void add(List<Key> keys){\n    if(keys == null) {\n      throw new IllegalArgumentException(\"ArrayList<Key> may not be null\");\n    }\n\n    for(Key key: keys) {\n      add(key);\n    }\n  }//end add()\n\n  /**\n   * Adds a collection of keys to <i>this</i> filter.\n   * @param keys The collection of keys.\n   */\n  public void add(Collection<Key> keys){\n    if(keys == null) {\n      throw new IllegalArgumentException(\"Collection<Key> may not be null\");\n    }\n    for(Key key: keys) {\n      add(key);\n    }\n  }//end add()\n\n  /**\n   * Adds an array of keys to <i>this</i> filter.\n   * @param keys The array of keys.\n   */\n  public void add(Key[] keys){\n    if(keys == null) {\n      throw new IllegalArgumentException(\"Key[] may not be null\");\n    }\n    for(int i = 0; i < keys.length; i++) {\n      add(keys[i]);\n    }\n  }//end add()","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/Filter.java#L156-L192","documentation":"Error \"Collection<Key> may not be null\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/Filter.java:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The Collection<Key> argument is null. Pass a non-null collection of keys."],"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-23T01:17:44.959Z"}