Skip to content

Commit 0f33c31

Browse files
committed
Java: Re-arrange import pattern for generated models.
1 parent 71bcae0 commit 0f33c31

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ private module Frameworks {
9292
private import semmle.code.java.frameworks.apache.IO
9393
private import semmle.code.java.frameworks.apache.Lang
9494
private import semmle.code.java.frameworks.Flexjson
95+
private import semmle.code.java.frameworks.generated
9596
private import semmle.code.java.frameworks.guava.Guava
9697
private import semmle.code.java.frameworks.jackson.JacksonSerializability
9798
private import semmle.code.java.frameworks.javaee.jsf.JSFRenderer

java/ql/lib/semmle/code/java/frameworks/apache/IO.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
/** Custom definitions related to the Apache Commons IO library. */
22

33
import java
4-
import IOGenerated
54
private import semmle.code.java.dataflow.ExternalFlow
65

7-
// TODO: manual models that were not generated yet
86
private class ApacheCommonsIOCustomSummaryCsv extends SummaryModelCsv {
7+
/**
8+
* Models that are not yet auto generated or where the generated summaries will
9+
* be ignored.
10+
* Note that if a callable has any handwritten summary, all generated summaries
11+
* will be ignored for that callable.
12+
*/
913
override predicate row(string row) {
1014
row =
1115
[
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* A module importing all generated Models as Data models.
3+
*/
4+
5+
import java
6+
7+
private module GeneratedFrameworks {
8+
private import apache.IOGenerated
9+
}

0 commit comments

Comments
 (0)