Do not print the packet id in #toXML when the id is null

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2222 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-02-10 15:36:05 +00:00 committed by gdombiak
parent 5ca12106d8
commit 15c6d3d49b
1 changed files with 3 additions and 1 deletions

View File

@ -199,7 +199,9 @@ public class Message extends Packet {
public String toXML() {
StringBuffer buf = new StringBuffer();
buf.append("<message");
buf.append(" id=\"").append(getPacketID()).append("\"");
if (getPacketID() != null) {
buf.append(" id=\"").append(getPacketID()).append("\"");
}
if (getTo() != null) {
buf.append(" to=\"").append(getTo()).append("\"");
}