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; ...@@ -36,8 +36,8 @@ import org.xmpp.packet.JID;
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class DestroyRoomRequest extends MUCRoomTask { public class DestroyRoomRequest extends MUCRoomTask {
private JID alternateJID; private JID alternateJID; // Is allowed to be null!
private String reason; private String reason; // Is allowed to be null or empty!
public DestroyRoomRequest() { public DestroyRoomRequest() {
} }
......
...@@ -122,8 +122,12 @@ public class IQOwnerHandler { ...@@ -122,8 +122,12 @@ public class IQOwnerHandler {
} }
} }
room.destroyRoom(new JID(destroyElement.attributeValue("jid")), JID alternateJID = null;
destroyElement.elementTextTrim("reason")); final String jid = destroyElement.attributeValue("jid");
if (jid != null) {
alternateJID = new JID(jid);
}
room.destroyRoom(alternateJID, destroyElement.elementTextTrim("reason"));
} }
else { else {
List<Element> itemsList = element.elements("item"); 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