1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-14 00:02:05 +01:00

NPE check in SmackConfiguration

This commit is contained in:
Florian Schmaus 2014-03-09 23:43:34 +01:00
parent 1f2183605c
commit f3e007bad5

View file

@ -291,7 +291,13 @@ public final class SmackConfiguration {
try { try {
loadSmackClass(classToLoad, optional); loadSmackClass(classToLoad, optional);
} catch (Exception e) { } catch (Exception e) {
// Don't throw the exception if an exceptions collection is given, instead
// record it there. This is used for unit testing purposes.
if (exceptions != null) {
exceptions.add(e); exceptions.add(e);
} else {
throw e;
}
} }
} }
} }