Skip to content

Commit f94d8c3

Browse files
committed
Abbreviate multi-column min
1 parent 510f5ab commit f94d8c3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

java/ql/src/utils/FlowTestCaseSupportMethods.qll

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ module SupportMethod {
6767

6868
/** Gets a generator method for the type `t` and the content type of the head of the component stack `c`. */
6969
GenMethod genMethodFor(Type t, SummaryComponentStack c) {
70-
result =
71-
min(GenMethod g |
72-
g = min(GenMethod g1 | g1.appliesTo(t, getContent(c.head())) | g1 order by g1.getPriority())
73-
)
70+
result = min(GenMethod g | g.appliesTo(t, getContent(c.head())) | g order by g.getPriority(), g)
7471
}
7572

7673
/** Gets a getter method for the content type of the head of the component stack `c`. */
@@ -80,10 +77,7 @@ module SupportMethod {
8077

8178
/** Gets a getter method for the type `t` and the content type of the head of the component stack `c`. */
8279
GetMethod getMethodFor(Type t, SummaryComponentStack c) {
83-
result =
84-
min(GetMethod g |
85-
g = min(GetMethod g1 | g1.appliesTo(t, getContent(c.head())) | g1 order by g1.getPriority())
86-
)
80+
result = min(GetMethod g | g.appliesTo(t, getContent(c.head())) | g order by g.getPriority(), g)
8781
}
8882
}
8983

0 commit comments

Comments
 (0)