mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-09 09:11:00 +08:00
A call through an interface-typed receiver (s.area() where s:Shape) hit java_lookup_method on the interface's OWN abstract method and emitted lsp_type_dispatch on Shape.area, never reaching the sole-implementer resolution — so lsp_interface_resolve / lsp_interface_dispatch were never produced. Resolve interface dispatch first when the receiver is an interface: a sole concrete in-project implementer -> lsp_interface_resolve (to that impl's method, synthesizing the QN when the method registry lacks it); two-or-more -> lsp_interface_dispatch; ZERO in-project impls -> fall through to type_dispatch on the interface method, keeping JDK interface calls (List/Stream/Predicate) strict. The sole-impl detection is factored into java_find_sole_impl and hardened: consult the method REGISTRY (the dispatch path's source of truth) since the per-type method-name array is often empty, match supertypes by full QN OR bare name (duplicate registry entries list a supertype short in one entry and fully-qualified in another), and dedup implementers by QN so one class with two registry entries is not miscounted as two implementers. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>