Commit 31fefac2 authored by guus's avatar guus

OF-606: AlternateJID should be optional, not required, when destroying a room....

OF-606: AlternateJID should be optional, not required, when destroying a room. I've added some Javadoc that explains what arguments are, and what arguments are not optional.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13424 b35dd754-fafc-0310-a699-88a17e54d16e
parent adc51827
......@@ -36,8 +36,8 @@ import org.xmpp.packet.JID;
* @author Gaston Dombiak
*/
public class DestroyRoomRequest extends MUCRoomTask {
private JID alternateJID;
private String reason;
private JID alternateJID; // Is allowed to be null!
private String reason; // Is allowed to be null or empty!
public DestroyRoomRequest() {
}
......
......@@ -122,8 +122,12 @@ public class IQOwnerHandler {
}
}
room.destroyRoom(new JID(destroyElement.attributeValue("jid")),
destroyElement.elementTextTrim("reason"));
JID alternateJID = null;
final String jid = destroyElement.attributeValue("jid");
if (jid != null) {
alternateJID = new JID(jid);
}
room.destroyRoom(alternateJID, destroyElement.elementTextTrim("reason"));
}
else {
List<Element> itemsList = element.elements("item");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment