From 644ddf3d4c48490452463bd08ae37f638934064a Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 3 Sep 2014 17:50:12 +0200 Subject: [PATCH] Presence class cleanup --- .../main/java/org/jivesoftware/smack/packet/Presence.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java index 47b142f99..f76b1015f 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java @@ -57,6 +57,8 @@ import org.jivesoftware.smack.util.XmlStringBuilder; */ public class Presence extends Packet { + public static final String ELEMENT = "presence"; + private Type type = Type.available; private String status = null; private int priority = Integer.MIN_VALUE; @@ -69,7 +71,6 @@ public class Presence extends Packet { * @param type the type. */ public Presence(Type type) { - super(); setType(type); } @@ -82,7 +83,6 @@ public class Presence extends Packet { * @param mode the mode type for this presence update. */ public Presence(Type type, String status, int priority, Mode mode) { - super(); setType(type); setStatus(status); setPriority(priority); @@ -227,7 +227,7 @@ public class Presence extends Packet { @Override public XmlStringBuilder toXML() { XmlStringBuilder buf = new XmlStringBuilder(); - buf.halfOpenElement("presence"); + buf.halfOpenElement(ELEMENT); buf.xmlnsAttribute(getXmlns()); buf.xmllangAttribute(getLanguage()); addCommonAttributes(buf); @@ -250,7 +250,7 @@ public class Presence extends Packet { if (error != null) { buf.append(error.toXML()); } - buf.closeElement("presence"); + buf.closeElement(ELEMENT); return buf; }