1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Make Objects.requireNonNull() throw IllegalArgumentException

and not NullPointerException. Altough this differs from
java.util.Objects behavior, throwing an IllegalArgumentException
appears more sensible and makes it easier to catch it in Smack's
parsing function.
This commit is contained in:
Florian Schmaus 2019-06-11 12:32:42 +02:00
parent 9bb36fc63c
commit 818ee8a727
5 changed files with 33 additions and 11 deletions

View file

@ -98,7 +98,7 @@ public class ReferenceTest extends SmackTestSuite {
@Test
public void typeArgumentNullTest() throws URISyntaxException {
assertThrows(NullPointerException.class, () ->
assertThrows(IllegalArgumentException.class, () ->
new ReferenceElement(1, 2, null, null, new URI("xmpp:test@test.test")));
}