mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-02 06:45:59 +01:00
NPE check in SmackConfiguration
This commit is contained in:
parent
1f2183605c
commit
f3e007bad5
1 changed files with 7 additions and 1 deletions
|
@ -291,7 +291,13 @@ public final class SmackConfiguration {
|
|||
try {
|
||||
loadSmackClass(classToLoad, optional);
|
||||
} 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);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue