diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java index 6f75e71ab..32a2edaf0 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java @@ -125,7 +125,7 @@ public final class ChatMarkersManager extends Manager { SmackException.NotLoggedInException { Message message = (Message) packet; // add a markable extension - message.addExtension(new ChatMarkersElements.MarkableExtension()); + message.addExtension(ChatMarkersElements.MarkableExtension.INSTANCE); } }, OUTGOING_MESSAGE_FILTER); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/element/ChatMarkersElements.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/element/ChatMarkersElements.java index 53b2b8552..46e81435a 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/element/ChatMarkersElements.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/element/ChatMarkersElements.java @@ -41,14 +41,16 @@ public class ChatMarkersElements { * @author Fernando Ramirez * */ - public static class MarkableExtension implements ExtensionElement { + public static final class MarkableExtension implements ExtensionElement { + + public static final MarkableExtension INSTANCE = new MarkableExtension(); /** * markable element. */ public static final String ELEMENT = ChatMarkersState.markable.toString(); - public MarkableExtension() { + private MarkableExtension() { } @Override diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/MarkableProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/MarkableProvider.java index f4c4384bb..c243b57da 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/MarkableProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/MarkableProvider.java @@ -34,7 +34,7 @@ public class MarkableProvider extends ExtensionElementProvider