Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8e2b02

Browse files
Add fieldFlowBranchLimit to the tests
1 parent 839c9e3 commit c8e2b02

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

java/ql/test/library-tests/frameworks/guava/TestCollect.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void test4(Table<String, String, String> t1, Table<String, String, String> t2, T
114114
sink(tableValue(t3)); // $ MISSING:numValueFlow=1 // depends on aliasing
115115
}
116116

117-
void test4(Multimap<String, String> m1, Multimap<String, String> m2, Multimap<String, String> m3,
117+
void test5(Multimap<String, String> m1, Multimap<String, String> m2, Multimap<String, String> m3,
118118
Multimap<String, String> m4, Multimap<String, String> m5){
119119
String x = taint();
120120
m1.put("k", x);
@@ -136,7 +136,7 @@ void test4(Multimap<String, String> m1, Multimap<String, String> m2, Multimap<St
136136
sink(multimapValue(m5)); // $ MISSING:numValueFlow=1 // depends on aliasing
137137
}
138138

139-
void test5(Comparator<String> comp, SortedSet<String> sorS, SortedMap<String, String> sorM) {
139+
void test6(Comparator<String> comp, SortedSet<String> sorS, SortedMap<String, String> sorM) {
140140
ImmutableSortedSet<String> s = ImmutableSortedSet.of(taint());
141141

142142
sink(element(s)); // $numValueFlow=1

java/ql/test/library-tests/frameworks/guava/flow.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class ValueFlowConf extends DataFlow::Configuration {
2424
override predicate isSink(DataFlow::Node n) {
2525
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
2626
}
27+
28+
override int fieldFlowBranchLimit() { result = 100 }
2729
}
2830

2931
class HasFlowTest extends InlineExpectationsTest {

0 commit comments

Comments
 (0)