diff --git a/build.gradle b/build.gradle index f94204b6b..80e0d72d7 100644 --- a/build.gradle +++ b/build.gradle @@ -96,7 +96,7 @@ allprojects { junitVersion = '4.11' } group = 'org.igniterealtime.smack' - sourceCompatibility = 1.7 + sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = sourceCompatibility version = shortVersion if (isSnapshot) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java b/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java index 2871b424f..70e6f7f8c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java @@ -1,6 +1,6 @@ /** * - * Copyright 2017 Florian Schmaus. + * Copyright 2017-2018 Florian Schmaus. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,6 @@ import org.jxmpp.jid.Jid; * * @see XEP-0296: Best Practices for Resource Locking */ -@SuppressWarnings("FunctionalInterfaceClash") public final class ChatManager extends Manager { private static final Map INSTANCES = new WeakHashMap<>(); @@ -201,31 +200,6 @@ public final class ChatManager extends Manager { return incomingListeners.add(listener); } - /** - * Add a new listener for incoming chat messages. - * - * @param listener the listener to add. - * @return true if the listener was not already added. - */ - @Deprecated - @SuppressWarnings("FunctionalInterfaceClash") - public boolean addListener(IncomingChatMessageListener listener) { - return addIncomingListener(listener); - } - - /** - * Remove an incoming chat message listener. - * - * @param listener the listener to remove. - * @return true if the listener was active and got removed. - * @deprecated Use {@link #removeIncomingListener(IncomingChatMessageListener)} instead. - */ - @Deprecated - @SuppressWarnings("FunctionalInterfaceClash") - public boolean removeListener(IncomingChatMessageListener listener) { - return incomingListeners.remove(listener); - } - /** * Remove an incoming chat message listener. * @@ -246,31 +220,6 @@ public final class ChatManager extends Manager { return outgoingListeners.add(listener); } - /** - * Add a new listener for incoming chat messages. - * - * @param listener the listener to add. - * @return true if the listener was not already added. - * @deprecated use {@link #addOutgoingListener(OutgoingChatMessageListener)} instead. - */ - @Deprecated - @SuppressWarnings("FunctionalInterfaceClash") - public boolean addListener(OutgoingChatMessageListener listener) { - return addOutgoingListener(listener); - } - - /** - * Remove an outgoing chat message listener. - * - * @param listener the listener to remove. - * @return true if the listener was active and got removed. - * @deprecated use {@link #removeOutgoingListener(OutgoingChatMessageListener)} instead. - */ - @Deprecated - public boolean removeListener(OutgoingChatMessageListener listener) { - return removeOutgoingListener(listener); - } - /** * Remove an outgoing chat message listener. *