{"record":{"id":"b2b7ace2b6fee48a","repo":"apache/hadoop","slug":"arraylist-key-may-not-be-null","errorCode":null,"errorMessage":"ArrayList<Key> may not be null","messagePattern":"ArrayList<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":160,"sourceCode":"   * <b>Invariant</b>: The result is assigned to <i>this</i> filter.\n   * @param filter The filter to XOR with.\n   */\n  public abstract void xor(Filter filter);\n\n  /**\n   * Performs a logical NOT on <i>this</i> filter.\n   * <p>\n   * The result is assigned to <i>this</i> filter.\n   */\n  public abstract void not();\n\n  /**\n   * Adds a list of keys to <i>this</i> filter.\n   * @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    }","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/bloom/Filter.java#L142-L178","documentation":"Error \"ArrayList<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:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The ArrayList<Key> argument is null. Pass a non-null list of keys (empty list is acceptable if the intent is a no-op)."],"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"}