1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 22:12:05 +01:00

Make Message and Presence class final

In order to prevent users from trying to subclass those two, trying to
add their custom attributes (or attribute values) in the element of
those two, instead of using extension elements aka. PacketExtension.

See

- http://stackoverflow.com/q/26516386/
- http://stackoverflow.com/q/26507753/
- http://stackoverflow.com/q/26542601/
This commit is contained in:
Florian Schmaus 2014-10-24 11:14:41 +02:00
parent 25887e3427
commit ce8ccf3647
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
* *
* @author Matt Tucker * @author Matt Tucker
*/ */
public class Message extends Packet { public final class Message extends Packet {
public static final String ELEMENT = "message"; public static final String ELEMENT = "message";
public static final String BODY = "body"; public static final String BODY = "body";

View file

@ -55,7 +55,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
* @see RosterPacket * @see RosterPacket
* @author Matt Tucker * @author Matt Tucker
*/ */
public class Presence extends Packet { public final class Presence extends Packet {
public static final String ELEMENT = "presence"; public static final String ELEMENT = "presence";