Skip to content

Commit 8112058

Browse files
committed
Java: Adapt TopJdpApi library to the re-factor.
1 parent 372ecf4 commit 8112058

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,15 @@ module Public {
261261
NeutralCallable() { neutralElement(this, _) }
262262

263263
/**
264-
* Holds if the neutral is auto generated.
264+
* Holds if the neutral is auto generated.
265265
*/
266266
predicate isAutoGenerated() { neutralElement(this, "generated") }
267267

268+
/**
269+
* Holds if there exists a manual neutral that applies to `this`.
270+
*/
271+
final predicate isManual() { this.hasProvenance("manual") }
272+
268273
/**
269274
* Holds if the neutral has provenance `provenance`.
270275
*/

java/ql/test/ext/TopJdkApis/TopJdkApis.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ class TopJdkApi extends SummarizedCallableBase {
7878
}
7979

8080
/** Holds if this API has a manual summary model. */
81-
private predicate hasManualSummary() { this.(SummarizedCallable).hasProvenance(false) }
81+
private predicate hasManualSummary() { this.(SummarizedCallable).isManual() }
8282

8383
/** Holds if this API has a manual neutral model. */
8484
private predicate hasManualNeutral() {
85-
this.(FlowSummaryImpl::Public::NeutralCallable).hasProvenance(false)
85+
this.(FlowSummaryImpl::Public::NeutralCallable).isManual()
8686
}
8787

8888
/** Holds if this API has a manual MaD model. */

0 commit comments

Comments
 (0)