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:
parent
9bb36fc63c
commit
818ee8a727
5 changed files with 33 additions and 11 deletions
|
@ -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")));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue