1
+ package generatedtest ;
2
+
3
+ import java .util .concurrent .Callable ;
4
+ import org .springframework .cache .Cache ;
5
+
6
+ // Test case generated by GenerateFlowTestCase.ql
7
+ public class Test {
8
+
9
+ Object getMapKey (Object container ) { return null ; }
10
+ Object getMapValue (Object container ) { return null ; }
11
+ Object newWithMapKey (Object element ) { return null ; }
12
+ Object newWithMapValue (Object element ) { return null ; }
13
+ Object source () { return null ; }
14
+ void sink (Object o ) { }
15
+
16
+ public void test () {
17
+
18
+ {
19
+ // "org.springframework.cache;Cache$ValueRetrievalException;false;ValueRetrievalException;;;Argument[0];MapKey of Argument[-1];value"
20
+ Cache .ValueRetrievalException out = null ;
21
+ Object in = source ();
22
+ out = new ValueRetrievalException (in , null , null );
23
+ sink (getMapKey (out )); // $hasValueFlow
24
+ }
25
+ {
26
+ // "org.springframework.cache;Cache$ValueRetrievalException;false;getKey;;;MapKey of Argument[-1];ReturnValue;value"
27
+ Object out = null ;
28
+ Cache .ValueRetrievalException in = (Cache .ValueRetrievalException )newWithMapKey (source ());
29
+ out = in .getKey ();
30
+ sink (out ); // $hasValueFlow
31
+ }
32
+ {
33
+ // "org.springframework.cache;Cache$ValueWrapper;true;get;;;MapValue of Argument[-1];ReturnValue;value"
34
+ Object out = null ;
35
+ Cache .ValueWrapper in = (Cache .ValueWrapper )newWithMapValue (source ());
36
+ out = in .get ();
37
+ sink (out ); // $hasValueFlow
38
+ }
39
+ {
40
+ // "org.springframework.cache;Cache;true;get;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value"
41
+ Cache .ValueWrapper out = null ;
42
+ Cache in = (Cache )newWithMapValue (source ());
43
+ out = in .get (null );
44
+ sink (getMapValue (out )); // $hasValueFlow
45
+ }
46
+ {
47
+ // "org.springframework.cache;Cache;true;get;(Object,Callable);;MapValue of Argument[-1];ReturnValue;value"
48
+ Object out = null ;
49
+ Cache in = (Cache )newWithMapValue (source ());
50
+ out = in .get (null , (Callable )null );
51
+ sink (out ); // $hasValueFlow
52
+ }
53
+ {
54
+ // "org.springframework.cache;Cache;true;get;(Object,Class);;MapValue of Argument[-1];ReturnValue;value"
55
+ Object out = null ;
56
+ Cache in = (Cache )newWithMapValue (source ());
57
+ out = in .get (null , (Class )null );
58
+ sink (out ); // $hasValueFlow
59
+ }
60
+ {
61
+ // "org.springframework.cache;Cache;true;getNativeCache;;;MapKey of Argument[-1];MapKey of ReturnValue;value"
62
+ Object out = null ;
63
+ Cache in = (Cache )newWithMapKey (source ());
64
+ out = in .getNativeCache ();
65
+ sink (getMapKey (out )); // $hasValueFlow
66
+ }
67
+ {
68
+ // "org.springframework.cache;Cache;true;getNativeCache;;;MapValue of Argument[-1];MapValue of ReturnValue;value"
69
+ Object out = null ;
70
+ Cache in = (Cache )newWithMapValue (source ());
71
+ out = in .getNativeCache ();
72
+ sink (getMapValue (out )); // $hasValueFlow
73
+ }
74
+ {
75
+ // "org.springframework.cache;Cache;true;put;;;Argument[0];MapKey of Argument[-1];value"
76
+ Cache out = null ;
77
+ Object in = source ();
78
+ out .put (in , null );
79
+ sink (getMapKey (out )); // $hasValueFlow
80
+ }
81
+ {
82
+ // "org.springframework.cache;Cache;true;put;;;Argument[1];MapValue of Argument[-1];value"
83
+ Cache out = null ;
84
+ Object in = source ();
85
+ out .put (null , in );
86
+ sink (getMapValue (out )); // $hasValueFlow
87
+ }
88
+ {
89
+ // "org.springframework.cache;Cache;true;putIfAbsent;;;Argument[0];MapKey of Argument[-1];value"
90
+ Cache out = null ;
91
+ Object in = source ();
92
+ out .putIfAbsent (in , null );
93
+ sink (getMapKey (out )); // $hasValueFlow
94
+ }
95
+ {
96
+ // "org.springframework.cache;Cache;true;putIfAbsent;;;Argument[1];MapValue of Argument[-1];value"
97
+ Cache out = null ;
98
+ Object in = source ();
99
+ out .putIfAbsent (null , in );
100
+ sink (getMapValue (out )); // $hasValueFlow
101
+ }
102
+ {
103
+ // "org.springframework.cache;Cache;true;putIfAbsent;;;MapValue of Argument[-1];MapValue of ReturnValue;value"
104
+ Cache .ValueWrapper out = null ;
105
+ Cache in = (Cache )newWithMapValue (source ());
106
+ out = in .putIfAbsent (null , null );
107
+ sink (getMapValue (out )); // $hasValueFlow
108
+ }
109
+
110
+ }
111
+
112
+ }
0 commit comments