1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-06-18 01:14:50 +02:00

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

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("\"");
}