From 37a21ec548321ecdc8f7d2f89b84ea88b1ea9b97 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Fri, 12 Jan 2024 13:34:50 +0100 Subject: [PATCH] Java: Address review comments. --- .../modelgenerator/internal/CaptureSummaryFlowQuery.qll | 5 +++-- .../test/utils/modelgenerator/dataflow/p/MultipleImpl2.java | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll b/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll index e353a39afc5..40190711e40 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureSummaryFlowQuery.qll @@ -73,8 +73,9 @@ string captureFlow(DataFlowTargetApi api) { } /** - * Gets the neutral summary for `api`, if any. - * A neutral model is generated, if there does not exist any summary model. + * Gets the neutral summary model for `api`, if any. + * A neutral summary model is generated, if we are not generating + * a summary model that applies to `api`. */ string captureNoFlow(DataFlowTargetApi api) { not exists(DataFlowTargetApi api0 | exists(captureFlow(api0)) and api0.lift() = api.lift()) and diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java b/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java index 1606ebb7412..9de2d59b2e4 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java @@ -2,6 +2,9 @@ package p; class MultipleImpl2 { + // Multiple implementations of the same interface. + // This is used to test that we only generate a summary model and + // not neutral summary model for `IInterface.m`. public interface IInterface { Object m(Object value); }