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. ToContains was removed also because it was unused in the existing Smack codebase.
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.