Fail closed when call-graph heuristic lacks class info
Tighten CallGraphPathFinder heuristic matching to avoid cross-class linking when only method names are available and class ownership is unknown. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -388,8 +388,10 @@ public class CallGraphPathFinder {
|
||||
if (simpleClassNeighbor.equals("this") || simpleClassNeighbor.equals("super")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
// If we have no class ownership information for either side, we can't prove a match beyond the
|
||||
// method name. Fail closed to avoid accidental cross-class linking.
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isFullyQualifiedMethod(String methodFqn) {
|
||||
|
||||
Reference in New Issue
Block a user