Browse Source

Small code tweaks

carbonEnable
Paul Schaub 1 month ago
parent
commit
67590caa0d
No known key found for this signature in database GPG Key ID: 62BEE9264BF17311
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java

+ 3
- 5
smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java View File

@@ -78,7 +78,7 @@ import org.jxmpp.jid.EntityFullJid;
public final class CarbonManager extends Manager {

private static final Logger LOGGER = Logger.getLogger(CarbonManager.class.getName());
private static Map<XMPPConnection, CarbonManager> INSTANCES = new WeakHashMap<XMPPConnection, CarbonManager>();
private static Map<XMPPConnection, CarbonManager> INSTANCES = new WeakHashMap<>();

private static boolean SHOULD_BE_ENABLED_DEFAULT = false;

@@ -128,7 +128,7 @@ public final class CarbonManager extends Manager {

carbonsListener = new StanzaListener() {
@Override
public void processStanza(final Stanza stanza) throws NotConnectedException, InterruptedException {
public void processStanza(final Stanza stanza) {
final Message wrappingMessage = (Message) stanza;
final CarbonExtension carbonExtension = CarbonExtension.from(wrappingMessage);
final Direction direction = carbonExtension.getDirection();
@@ -263,12 +263,10 @@ public final class CarbonManager extends Manager {
* You should first check for support using isSupportedByServer().
*
* @param new_state whether carbons should be enabled or disabled
* @throws NotConnectedException if the XMPP connection is not connected.
* @throws InterruptedException if the calling thread was interrupted.
* @deprecated use {@link #enableCarbonsAsync(ExceptionCallback)} or {@link #disableCarbonsAsync(ExceptionCallback)} instead.
*/
@Deprecated
public void sendCarbonsEnabled(final boolean new_state) throws NotConnectedException, InterruptedException {
public void sendCarbonsEnabled(final boolean new_state) {
sendUseCarbons(new_state, null);
}



Loading…
Cancel
Save