1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 01:29:38 +02:00

Reworked compression-jzlib and compressionHandlers

- There is now no longer the need to use reflection for
compression-jzlib.
- compressionHandlers are a global configuration property and therefore
belong in SmackConfiguration.
This commit is contained in:
Florian Schmaus 2014-03-10 10:20:52 +01:00
parent 489816c61f
commit a3ab886896
5 changed files with 50 additions and 55 deletions

View file

@ -827,10 +827,7 @@ public class TCPConnection extends XMPPConnection {
*/
private XMPPInputOutputStream maybeGetCompressionHandler() {
if (compressionMethods != null) {
for (XMPPInputOutputStream handler : compressionHandlers) {
if (!handler.isSupported())
continue;
for (XMPPInputOutputStream handler : SmackConfiguration.getCompresionHandlers()) {
String method = handler.getCompressionMethod();
if (compressionMethods.contains(method))
return handler;