{"record":{"id":"09f94396048d6660","repo":"openzipkin/zipkin","slug":"keys-null","errorCode":null,"errorMessage":"keys == null","messagePattern":"keys == null","errorType":"validation","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/CassandraStorageBuilder.java","lineNumber":76,"sourceCode":"    return result;\n  }\n\n  CassandraStorageBuilder(String defaultKeyspace) {\n    keyspace = defaultKeyspace;\n  }\n\n  @Override public B strictTraceId(boolean strictTraceId) {\n    this.strictTraceId = strictTraceId;\n    return (B) this;\n  }\n\n  @Override public B searchEnabled(boolean searchEnabled) {\n    this.searchEnabled = searchEnabled;\n    return (B) this;\n  }\n\n  @Override public B autocompleteKeys(List<String> keys) {\n    if (keys == null) throw new NullPointerException(\"keys == null\");\n    this.autocompleteKeys = Set.copyOf(keys);\n    return (B) this;\n  }\n\n  @Override public B autocompleteTtl(int autocompleteTtl) {\n    if (autocompleteTtl <= 0) throw new IllegalArgumentException(\"autocompleteTtl <= 0\");\n    this.autocompleteTtl = autocompleteTtl;\n    return (B) this;\n  }\n\n  @Override public B autocompleteCardinality(int autocompleteCardinality) {\n    if (autocompleteCardinality <= 0) {\n      throw new IllegalArgumentException(\"autocompleteCardinality <= 0\");\n    }\n    this.autocompleteCardinality = autocompleteCardinality;\n    return (B) this;\n  }\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/openzipkin/zipkin/blob/878ce2a1fad54ca941d17fdcf2e1d924b148eb1f/zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/CassandraStorageBuilder.java#L58-L94","documentation":"CassandraStorageBuilder.autocompleteKeys(List<String>) throws NullPointerException ('keys == null') when the autocomplete tag key list is set to null. These keys define which span tags are indexed for autocomplete in Cassandra; a null list has no meaningful interpretation, so the builder rejects it (an empty list is valid and disables autocomplete indexing).","triggerScenarios":"Calling CassandraStorage.newBuilder().autocompleteKeys(null), or passing a config-derived list where the property was unset and resolved to null.","commonSituations":"Mapping an optional zipkin.storage.cassandra.autocomplete-keys property straight into the builder when the property is absent; refactoring that made the list @Nullable.","solutions":["Pass an explicit list: autocompleteKeys(List.of(\"env\", \"site\")), or an empty list to disable","Default null config values to an empty list before calling the builder","Check the property name spelling that populates the list"],"exampleFix":"// before\nList<String> keys = config.get(\"autocompleteKeys\"); // null when unset\nbuilder.autocompleteKeys(keys);\n\n// after\nList<String> keys = config.getOrDefault(\"autocompleteKeys\", List.of());\nbuilder.autocompleteKeys(keys);","handlingStrategy":"validation","validationCode":"List<String> keys = config.get(\"autocompleteKeys\");\nbuilder.autocompleteKeys(keys != null ? keys : List.of());","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize optional collection config to empty collections, never null","Use getOrDefault on config maps for list-valued settings"],"tags":["zipkin","cassandra","autocomplete","null-check","builder"],"backgroundTag":null,"analyzedSha":"878ce2a1fad54ca941d17fdcf2e1d924b148eb1f","analyzedAt":"2026-08-14T15:17:09.895Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}