1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 10:37:59 +01:00

Fixed extra space in XML writing.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1808 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-01-17 18:27:49 +00:00 committed by mtucker
parent 8322f022cc
commit 83016425cf

View file

@ -195,18 +195,18 @@ public class Presence extends Packet {
public String toXML() { public String toXML() {
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append("<presence "); buf.append("<presence");
if (getPacketID() != null) { if (getPacketID() != null) {
buf.append("id=\"").append(getPacketID()).append("\" "); buf.append(" id=\"").append(getPacketID()).append("\"");
} }
if (getTo() != null) { if (getTo() != null) {
buf.append("to=\"").append(getTo()).append("\" "); buf.append(" to=\"").append(getTo()).append("\"");
} }
if (getFrom() != null) { if (getFrom() != null) {
buf.append("from=\"").append(getFrom()).append("\" "); buf.append(" from=\"").append(getFrom()).append("\"");
} }
if (type != Type.AVAILABLE) { if (type != Type.AVAILABLE) {
buf.append("type=\"").append(type).append("\""); buf.append(" type=\"").append(type).append("\"");
} }
buf.append(">"); buf.append(">");
if (status != null) { if (status != null) {