File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
java/ql/test/library-tests/dataflow/entrypoint-types Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,16 @@ public String getField5() {
23
23
}
24
24
}
25
25
26
+ static class ParameterizedTestObject <T , K > {
27
+ public String field6 ;
28
+ public T field7 ;
29
+ private K field8 ;
30
+
31
+ public K getField8 () {
32
+ return field8 ;
33
+ }
34
+ }
35
+
26
36
private static void sink (String sink ) {}
27
37
28
38
public static void test (TestObject source ) {
@@ -31,4 +41,13 @@ public static void test(TestObject source) {
31
41
sink (source .getField3 ().field4 ); // $hasTaintFlow
32
42
sink (source .getField3 ().getField5 ()); // $hasTaintFlow
33
43
}
44
+
45
+ public static void testParameterized (
46
+ ParameterizedTestObject <String , AnotherTestObject > source ) {
47
+ sink (source .field6 ); // $hasTaintFlow
48
+ sink (source .getField7 ().field1 ); // $hasTaintFlow
49
+ sink (source .getField7 ().getField2 ()); // $hasTaintFlow
50
+ sink (source .getField8 ().field4 ); // $hasTaintFlow
51
+ sink (source .getField8 ().getField5 ()); // $hasTaintFlow
52
+ }
34
53
}
You can’t perform that action at this time.
0 commit comments