{"record":{"id":"062d6a05ac72c3c5","repo":"openzipkin/zipkin","slug":"missing","errorCode":null,"errorMessage":"Missing :","messagePattern":"Missing :","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"zipkin/src/main/java/zipkin2/DependencyLink.java","lineNumber":96,"sourceCode":"    }\n\n    /** @see #callCount() */\n    public Builder callCount(long callCount) {\n      this.callCount = callCount;\n      return this;\n    }\n\n    /** @see #errorCount() */\n    public Builder errorCount(long errorCount) {\n      this.errorCount = errorCount;\n      return this;\n    }\n\n    public DependencyLink build() {\n      String missing = \"\";\n      if (parent == null) missing += \" parent\";\n      if (child == null) missing += \" child\";\n      if (!missing.isEmpty()) throw new IllegalStateException(\"Missing :\" + missing);\n      return new DependencyLink(this);\n    }\n  }\n\n  @Override public String toString() {\n    return new String(DependencyLinkBytesEncoder.JSON_V1.encode(this), UTF_8);\n  }\n\n  // clutter below mainly due to difficulty working with Kryo which cannot handle AutoValue subclass\n  // See https://github.com/openzipkin/zipkin/issues/1879\n  final String parent, child;\n  final long callCount, errorCount;\n\n  DependencyLink(Builder builder) {\n    parent = builder.parent;\n    child = builder.child;\n    callCount = builder.callCount;\n    errorCount = builder.errorCount;","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/openzipkin/zipkin/blob/878ce2a1fad54ca941d17fdcf2e1d924b148eb1f/zipkin/src/main/java/zipkin2/DependencyLink.java#L78-L114","documentation":"DependencyLink.Builder.build throws IllegalStateException('Missing : parent child') when build() runs without both parent and child having been set. This is the deferred counterpart to the per-field NPEs: if the builder was constructed from a source or manipulated directly, the missing fields are only detected at build time, and the message lists exactly which fields are absent.","triggerScenarios":"Calling build() after newBuilder() with only parent(...) set (or neither field), or constructing a Builder from a DependencyLink whose fields were somehow cleared.","commonSituations":"Copy-paste builders that set the same field twice; conditional code that skips child(...) in an edge case; data-driven link construction where one side's key is absent from input.","solutions":["Set both parent and child before build().","Validate inputs up front and skip/pad the link when a name is missing.","Add a unit test asserting links built from your aggregation always have both names."],"exampleFix":"// before\nDependencyLink link = DependencyLink.newBuilder().parent(\"frontend\").callCount(2).build();\n\n// after\nDependencyLink link = DependencyLink.newBuilder().parent(\"frontend\").child(\"backend\").callCount(2).build();","handlingStrategy":"validation","validationCode":"if (parent == null || child == null) throw new IllegalStateException(\"link incomplete: parent=\" + parent + \", child=\" + child);\nDependencyLink link = DependencyLink.newBuilder().parent(parent).child(child).build();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set parent and child in the same code block so one is never forgotten","Unit-test link construction from your aggregation pipeline"],"tags":["core","dependency-link","builder","illegal-state","validation"],"backgroundTag":null,"analyzedSha":"878ce2a1fad54ca941d17fdcf2e1d924b148eb1f","analyzedAt":"2026-08-14T15:17:09.895Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}