Skip to content

Java: confident links to bodyless interface / abstract methods (#3757's pattern outside TS/JS) #3836

Closed

Description

@squid-protocol

What

#3757 is still open for Java. #3757 stopped TypeScript and JavaScript links from landing on bodyless declarations: interface members, abstract methods and overload signatures. It did this through def_shape = signature, which the resolver skips. That classification is TS/JS-only, so Java's interface methods and abstract methods are still link targets.

Evidence

Measured vs scip-java 0.12.3 on google/gson @ 854c8255 (#3783). There are 161 confident links in the unmapped_dst verdict: the engine's target has no counterpart with a body. Samples, checked in source:

  • extras/.../InterceptorFactory.java read calls postDeserializer.postDeserialize(result);. The engine links JsonPostDeserializer.java:postDeserialize@30, which is public void postDeserialize(T object);, an interface method with no body.
  • gson/.../TypeAdapter.java toJson calls write(writer, value);. The engine links TypeAdapter.java:write@131, which is public abstract void write(JsonWriter out, T value).

Likely fix

Extend the detector's def_shape classification to Java. A method declaration that ends in ; with no body becomes signature, which covers interface and abstract methods. The resolver already skips signatures.

This is the same fix as #3767, applied to one more language. Keep its language scoping, and add a guard test for languages without bodyless declarations. C# and Kotlin interfaces have the same shape, so they're candidates for the same change.

Epic #3772.

Activity

  1. added
    bug
    core-engine
    on Sep 26, 2026
  2. added
    scope:infra
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-enginescope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions