1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Fix SmackConfiguration disabledSmackClasses

contains() should ckeck against 'classToLoad' not 'name'.
This commit is contained in:
Florian Schmaus 2014-03-27 16:28:49 +01:00
parent a83b44e102
commit 17a254edca

View file

@ -319,11 +319,11 @@ public final class SmackConfiguration {
eventType = parser.next(); eventType = parser.next();
name = parser.getName(); name = parser.getName();
if (eventType == XmlPullParser.START_TAG && "className".equals(name)) { if (eventType == XmlPullParser.START_TAG && "className".equals(name)) {
if (disabledSmackClasses.contains(name)) { String classToLoad = parser.nextText();
LOGGER.info("Not loading disabled Smack class " + name); if (disabledSmackClasses.contains(classToLoad)) {
LOGGER.info("Not loading disabled Smack class " + classToLoad);
} }
else { else {
String classToLoad = parser.nextText();
try { try {
loadSmackClass(classToLoad, optional); loadSmackClass(classToLoad, optional);
} catch (Exception e) { } catch (Exception e) {