Using the ToContains filter could lead to potential insecure code. It was removed in 980047. If you really want/have to use it, then you have to re-implement your own ToContains filter. But I really wonder what the use-case would be.
I had used the filter to get only chats for a specific user. Cf.
https://github.com/jenkinsci/jabber-plugin/blob/8e42c15b9ab22bf205c5f3a0ec57d937 f4ee537d/src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.jav a#L477
I guess, I’ve never been really sure if it was actually necessary to have the filter. I assume that the filter would get by default only the messages for the current user, right?
ToContains was removed also because it was unused in the existing Smack codebase.
Well the point of a library is that it will also provide helpful classes, which are not used in the library itself, but only by clients of it, isn’t it?
Basically, I just wondered that it was removed without notice.
BTW: there still seems to be an integration test using it:https://github.com/igniterealtime/Smack/blob/master/smack-core/src/integration-t est/java/org/jivesoftware/smack/filter/ToContainsFilterTest.java
How does that even compile?
It does not. The integration tests are currently unused and not build.
Makes total sense to have integration tests and then not use them