mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +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:
parent
489816c61f
commit
a3ab886896
5 changed files with 50 additions and 55 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue