@@ -18,27 +18,27 @@ public void onMessage(Message message) { // $source
18
18
if (message instanceof TextMessage ) {
19
19
TextMessage textMessage = (TextMessage ) message ;
20
20
String text = textMessage .getText ();
21
- sink (text ); // $detected
21
+ sink (text ); // $tainted
22
22
} else if (message instanceof BytesMessage ) {
23
23
BytesMessage bytesMessage = (BytesMessage ) message ;
24
24
byte [] data = new byte [1024 ];
25
25
bytesMessage .readBytes (data , 42 );
26
- sink (new String (data )); // $detected
27
- sink (bytesMessage .readUTF ()); // $detected
26
+ sink (new String (data )); // $tainted
27
+ sink (bytesMessage .readUTF ()); // $tainted
28
28
} else if (message instanceof MapMessage ) {
29
29
MapMessage mapMessage = (MapMessage ) message ;
30
- sink (mapMessage .getString ("data" )); // $detected
31
- sink (new String (mapMessage .getBytes ("bytes" ))); // $detected
30
+ sink (mapMessage .getString ("data" )); // $tainted
31
+ sink (new String (mapMessage .getBytes ("bytes" ))); // $tainted
32
32
} else if (message instanceof ObjectMessage ) {
33
33
ObjectMessage objectMessage = (ObjectMessage ) message ;
34
- sink ((String ) objectMessage .getObject ()); // $detected
34
+ sink ((String ) objectMessage .getObject ()); // $tainted
35
35
} else if (message instanceof StreamMessage ) {
36
36
StreamMessage streamMessage = (StreamMessage ) message ;
37
37
byte [] data = new byte [1024 ];
38
38
streamMessage .readBytes (data );
39
- sink (new String (data )); // $detected
40
- sink (streamMessage .readString ()); // $detected
41
- sink ((String ) streamMessage .readObject ()); // $detected
39
+ sink (new String (data )); // $tainted
40
+ sink (streamMessage .readString ()); // $tainted
41
+ sink ((String ) streamMessage .readObject ()); // $tainted
42
42
}
43
43
} catch (Exception e ) {
44
44
}
@@ -47,25 +47,25 @@ public void onMessage(Message message) { // $source
47
47
public void readFromCounsumer (MessageConsumer consumer ) throws Exception {
48
48
TextMessage message = (TextMessage ) consumer .receive (5000 ); // $source
49
49
String text = message .getText ();
50
- sink (text ); // $detected
50
+ sink (text ); // $tainted
51
51
message = (TextMessage ) consumer .receive (); // $source
52
52
text = message .getText ();
53
- sink (text ); // $detected
53
+ sink (text ); // $tainted
54
54
message = (TextMessage ) consumer .receiveNoWait (); // $source
55
55
text = message .getText ();
56
- sink (text ); // $detected
56
+ sink (text ); // $tainted
57
57
}
58
58
59
59
public void readFromQueueRequestor (QueueRequestor requestor , Message message ) throws Exception {
60
60
TextMessage reply = (TextMessage ) requestor .request (message ); // $source
61
61
String text = reply .getText ();
62
- sink (text ); // $detected
62
+ sink (text ); // $tainted
63
63
}
64
64
65
65
public void readFromTopicRequestor (TopicRequestor requestor , Message message ) throws Exception {
66
66
TextMessage reply = (TextMessage ) requestor .request (message ); // $source
67
67
String text = reply .getText ();
68
- sink (text ); // $detected
68
+ sink (text ); // $tainted
69
69
}
70
70
71
71
private void sink (String data ) {
0 commit comments