From ab334f6c1b37143293dd3336adf4bfa793e82842 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 8 Aug 2023 10:01:43 +0200 Subject: [PATCH] Java: Always apply heuristic query regardless of existing models. --- .../lib/semmle/code/java/dispatch/WrappedInvocation.qll | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/java/ql/lib/semmle/code/java/dispatch/WrappedInvocation.qll b/java/ql/lib/semmle/code/java/dispatch/WrappedInvocation.qll index 83bdaadfb7a..77f3ff11291 100644 --- a/java/ql/lib/semmle/code/java/dispatch/WrappedInvocation.qll +++ b/java/ql/lib/semmle/code/java/dispatch/WrappedInvocation.qll @@ -62,16 +62,9 @@ Method getRunnerTarget(MethodAccess ma) { import semmle.code.java.dataflow.FlowSummary import semmle.code.java.dataflow.internal.FlowSummaryImplSpecific as ImplSpecific -private predicate hasExternalSummary(Callable c) { - exists(SummarizedCallableBase scb | scb.asCallable() = c | - ImplSpecific::summaryElement(scb, _, _, _, _) - ) -} - private predicate mayInvokeCallback(SrcMethod m, int n) { m.getParameterType(n).(RefType).getSourceDeclaration() instanceof FunctionalInterface and - (not m.fromSource() or m.isNative() or m.getFile().getAbsolutePath().matches("%/test/stubs/%")) and - not hasExternalSummary(m) + (not m.fromSource() or m.isNative() or m.getFile().getAbsolutePath().matches("%/test/stubs/%")) } private class SummarizedCallableWithCallback extends SummarizedCallable {