Fix false negative when non-bridge method matches compiler-generated bridge method (issue #507) by siom79 · Pull Request #508 · siom79/japicmp (original) (raw)

@claude

…bridge method (issue #507)

When a class changes from implementing a generic interface with raw types to concrete type parameters, the Java compiler generates a bridge method with the same erased signature as the old raw-type method. JApiCmp was incorrectly matching the old non-bridge method to this new bridge method, causing the removal to go undetected.

Fix: in findMatchingMethod(), filter candidates to only those with the same bridge status as the probe method before comparison. This ensures non-bridge methods are never matched to bridge methods (and vice versa), so the old method is correctly reported as REMOVED and METHOD_REMOVED compatibility change is raised.

https://claude.ai/code/session_016hDBKp7sFAaMQ2BfuSbna7

@siom79 siom79 deleted the claude/plan-issue-507-fix-SMPd6 branch

May 7, 2026 20:15

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})