mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +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
|
@ -32,7 +32,7 @@ import org.junit.Test;
|
|||
*/
|
||||
public class JingleContentTest extends SmackTestSuite {
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void emptyBuilderThrowsTest() {
|
||||
JingleContent.Builder builder = JingleContent.getBuilder();
|
||||
builder.build();
|
||||
|
|
|
@ -41,7 +41,7 @@ public class JingleTest extends SmackTestSuite {
|
|||
builder.build();
|
||||
}
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void onlySessionIdBuilderTest() {
|
||||
String sessionId = "testSessionId";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue