File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,19 @@ private module DispatchImpl {
45
45
* The following heuristic is applied for finding the appropriate callable:
46
46
* 1. If an exact manual model exists, only dispatch to the summarized callable.
47
47
* 2. If a (non exact) manual model exists and/or if the source code is available, dispatch to both/either.
48
- * 3. Only dispatch to a summarized callable (based on a generated model) if neither of the above apply .
48
+ * 3. Only dispatch to a summarized callable in case the static call target in not in source .
49
49
*/
50
50
DataFlowCallable viableCallable ( DataFlowCall c ) {
51
51
exists ( Call call | call = c .asCall ( ) |
52
52
result .asCallable ( ) = sourceDispatch ( call )
53
53
or
54
54
not (
55
55
// Only use summarized callables with generated summaries in case
56
- // we are not able to dispatch to a source declaration .
56
+ // the static call target is not in the source code .
57
57
// Note that if applyGeneratedModel holds it implies that there doesn't
58
- // exist a manual (exact) model.
59
- exists ( Callable callable | callable = sourceDispatch ( call ) |
60
- callable .fromSource ( ) and not callable .isStub ( )
58
+ // exist a manual model.
59
+ exists ( Callable staticTarget | staticTarget = call . getCallee ( ) . getSourceDeclaration ( ) |
60
+ staticTarget .fromSource ( ) and not staticTarget .isStub ( )
61
61
) and
62
62
result .asSummarizedCallable ( ) .applyGeneratedModel ( )
63
63
) and
You can’t perform that action at this time.
0 commit comments