mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Add support for CustomSmackConfiguration class
with DISABLED_SMACK_CLASSES String[] option.
This commit is contained in:
parent
a1227b78cc
commit
a83b44e102
1 changed files with 19 additions and 0 deletions
|
@ -19,6 +19,7 @@ package org.jivesoftware.smack;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -100,6 +101,24 @@ public final class SmackConfiguration {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Class<?> c = Class.forName("org.jivesoftware.smack.CustomSmackConfiguration");
|
||||||
|
Field f = c.getField("DISABLED_SMACK_CLASSES");
|
||||||
|
String[] sa = (String[]) f.get(null);
|
||||||
|
if (sa != null)
|
||||||
|
for (String s : sa)
|
||||||
|
disabledSmackClasses.add(s);
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException e1) {
|
||||||
|
}
|
||||||
|
catch (NoSuchFieldException e) {
|
||||||
|
}
|
||||||
|
catch (SecurityException e) {
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException e) {
|
||||||
|
}
|
||||||
|
catch (IllegalAccessException e) {
|
||||||
|
}
|
||||||
|
|
||||||
InputStream configFileStream;
|
InputStream configFileStream;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue