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() {
2323 }
2424 }
2525
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+
2636 private static void sink (String sink ) {}
2737
2838 public static void test (TestObject source ) {
@@ -31,4 +41,13 @@ public static void test(TestObject source) {
3141 sink (source .getField3 ().field4 ); // $hasTaintFlow
3242 sink (source .getField3 ().getField5 ()); // $hasTaintFlow
3343 }
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+ }
3453}
You can’t perform that action at this time.
0 commit comments