mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
Make Message.setType(Type) not throw if type is null
RFC 6121 § 5.2.2: """ If an application receives a message with no 'type' attribute or the application does not understand the value of the 'type' attribute provided, it MUST consider the message to be of type "normal" (i.e., "normal" is the default). """
This commit is contained in:
parent
3299515b36
commit
ed4d815fba
2 changed files with 5 additions and 14 deletions
|
@ -69,12 +69,6 @@ public class MessageTest {
|
|||
assertXMLEqual(control, messageTypeSet.toXML().toString());
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void setMessageTypeNullTest() {
|
||||
Message message = getNewMessage();
|
||||
message.setType(null);
|
||||
}
|
||||
|
||||
@Test(expected=NullPointerException.class)
|
||||
public void setNullMessageBodyTest() {
|
||||
Message message = getNewMessage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue