From 2132ee52d5d82acb7029db62fda9721972a3f5eb Mon Sep 17 00:00:00 2001 From: Sauyon Lee Date: Wed, 25 Aug 2021 13:57:16 -0700 Subject: [PATCH] Restrict the size of appliesTo for default methods --- java/ql/src/utils/FlowTestCaseSupportMethods.qll | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/ql/src/utils/FlowTestCaseSupportMethods.qll b/java/ql/src/utils/FlowTestCaseSupportMethods.qll index 19ccf7b7668..831c394a188 100644 --- a/java/ql/src/utils/FlowTestCaseSupportMethods.qll +++ b/java/ql/src/utils/FlowTestCaseSupportMethods.qll @@ -8,6 +8,7 @@ private import semmle.code.java.dataflow.ExternalFlow private import semmle.code.java.dataflow.FlowSummary private import semmle.code.java.dataflow.internal.FlowSummaryImpl private import FlowTestCaseUtils +private import FlowTestCase /** * Returns a valid Java token naming the field `fc`. @@ -157,7 +158,7 @@ private class DefaultGetMethod extends GetMethod { override predicate appliesTo(Type t, Content c1) { c = c1 and // suppress unused variable warning - t = t + t = [any(TestCase tc).getOutputType(), any(VoidType v)] } bindingset[arg] @@ -297,7 +298,7 @@ private class DefaultGenMethod extends GenMethod { override predicate appliesTo(Type t, Content c1) { c = c1 and // suppress unused variable warning - t = t + t = [any(TestCase tc).getInputType(), any(VoidType v)] } bindingset[arg]