Skip to content

Java record component types are skipped during reference extraction #1519

Description

@oleksii-tumanov

Context

Java records are emitted as source-backed type nodes, but their component types are skipped during reference extraction. Reproduced on v8 (0.8.51, 73710d3).

Reproducer

class PaymentGateway {}
class Item {}

record Order(PaymentGateway gateway, List<Item> items) {}

Cache result

Label-normalized relevant edges from graphify-out/cache/ast/v0.8.51/<content-hash>.json:

[
  {
    "source": "RecordComponents.java",
    "target": "PaymentGateway",
    "relation": "contains",
    "confidence": "EXTRACTED"
  },
  {
    "source": "RecordComponents.java",
    "target": "Item",
    "relation": "contains",
    "confidence": "EXTRACTED"
  },
  {
    "source": "RecordComponents.java",
    "target": "Order",
    "relation": "contains",
    "confidence": "EXTRACTED"
  }
]

Order has no references to PaymentGateway, List, or Item.

Expected

Emit references edges from Order to PaymentGateway and List with context=field, and to Item with context=generic_arg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions