mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-06 19:02:07 +01:00
[build] Bump error prone from 2.9.0 to 2.32.0
This commit is contained in:
parent
07d9d694da
commit
beacb5eb8e
69 changed files with 265 additions and 255 deletions
|
@ -142,8 +142,7 @@ dependencies {
|
|||
|
||||
testImplementation 'com.jamesmurty.utils:java-xmlbuilder:1.2'
|
||||
|
||||
errorprone 'com.google.errorprone:error_prone_core:2.9.0'
|
||||
errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
|
||||
errorprone 'com.google.errorprone:error_prone_core:2.32.0'
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright © 2014-2021 Florian Schmaus
|
||||
* Copyright © 2014-2024 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -121,6 +121,7 @@ public final class ServerPingWithAlarmManager extends Manager {
|
|||
|
||||
private static final BroadcastReceiver ALARM_BROADCAST_RECEIVER = new BroadcastReceiver() {
|
||||
@Override
|
||||
@SuppressWarnings("LockOnNonEnclosingClassLiteral")
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
LOGGER.fine("Ping Alarm broadcast received");
|
||||
Set<Map.Entry<XMPPConnection, ServerPingWithAlarmManager>> managers;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2003-2007 Jive Software, 2014-2020 Florian Schmaus
|
||||
* Copyright 2003-2007 Jive Software, 2014-2024 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -63,7 +63,7 @@ public final class SmackInitialization {
|
|||
|
||||
private static final Logger LOGGER = Logger.getLogger(SmackInitialization.class.getName());
|
||||
|
||||
/**
|
||||
/*
|
||||
* Loads the configuration from the smack-config.xml and system properties file.
|
||||
* <p>
|
||||
* So far this means that:
|
||||
|
|
|
@ -667,7 +667,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class DisconnectedState extends State {
|
||||
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private DisconnectedState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -708,6 +709,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
private final class LookupRemoteConnectionEndpointsState extends State {
|
||||
boolean outgoingElementsQueueWasShutdown;
|
||||
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private LookupRemoteConnectionEndpointsState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -818,6 +821,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class ConnectedButUnauthenticatedState extends State {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private ConnectedButUnauthenticatedState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -850,6 +855,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class SaslAuthenticationState extends State {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private SaslAuthenticationState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -893,6 +900,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
public static final class ResourceBindingStateDescriptor extends StateDescriptor {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private ResourceBindingStateDescriptor() {
|
||||
super(ResourceBindingState.class, "RFC 6120 § 7");
|
||||
addSuccessor(AuthenticatedAndResourceBoundStateDescriptor.class);
|
||||
|
@ -900,6 +909,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class ResourceBindingState extends State {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private ResourceBindingState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -955,6 +966,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class AuthenticatedAndResourceBoundState extends State {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private AuthenticatedAndResourceBoundState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -995,6 +1008,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class ShutdownState extends State {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private ShutdownState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
@ -1057,6 +1072,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private static final class InstantShutdownState extends NoOpState {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private InstantShutdownState(ModularXmppClientToServerConnection connection, StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(connection, stateDescriptor, connectionInternal);
|
||||
|
@ -1078,6 +1095,8 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
}
|
||||
|
||||
private final class CloseConnectionState extends State {
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private CloseConnectionState(StateDescriptor stateDescriptor,
|
||||
ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(stateDescriptor, connectionInternal);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2018-2020 Florian Schmaus
|
||||
* Copyright 2018-2024 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -41,6 +41,8 @@ public class CompressionModuleDescriptor extends ModularXmppClientToServerConnec
|
|||
|
||||
public static final class Builder extends ModularXmppClientToServerConnectionModuleDescriptor.Builder {
|
||||
|
||||
// Invoked via reflection.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private Builder(ModularXmppClientToServerConnectionConfiguration.Builder connectionConfigurationBuilder) {
|
||||
super(connectionConfigurationBuilder);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2018-2021 Florian Schmaus
|
||||
* Copyright 2018-2024 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -368,7 +368,7 @@ public class StateDescriptorGraph {
|
|||
}
|
||||
}
|
||||
|
||||
public static <E> void stateDescriptorGraphToDot(Collection<GraphVertex<StateDescriptor>> vertexes,
|
||||
public static void stateDescriptorGraphToDot(Collection<GraphVertex<StateDescriptor>> vertexes,
|
||||
PrintWriter dotOut, boolean breakStateName) {
|
||||
dotOut.append("digraph {\n");
|
||||
dfs(vertexes,
|
||||
|
|
|
@ -41,6 +41,8 @@ public class InstantStreamResumptionModuleDescriptor extends ModularXmppClientTo
|
|||
|
||||
public static final class Builder extends ModularXmppClientToServerConnectionModuleDescriptor.Builder {
|
||||
|
||||
// Unfinished implementation.
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private Builder(ModularXmppClientToServerConnectionConfiguration.Builder connectionConfigurationBuilder) {
|
||||
super(connectionConfigurationBuilder);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.io.StringReader;
|
|||
import java.net.HttpURLConnection;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -58,7 +59,7 @@ class HTTPProxySocketConnection implements ProxySocketConnection {
|
|||
proxyLine = "\r\nProxy-Authorization: Basic " + Base64.encode(username + ":" + password);
|
||||
}
|
||||
socket.getOutputStream().write((hostport + " HTTP/1.1\r\nHost: "
|
||||
+ host + ":" + port + proxyLine + "\r\n\r\n").getBytes("UTF-8"));
|
||||
+ host + ":" + port + proxyLine + "\r\n\r\n").getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
InputStream in = socket.getInputStream();
|
||||
StringBuilder got = new StringBuilder(100);
|
||||
|
|
|
@ -55,6 +55,7 @@ public class CollectionUtil {
|
|||
boolean test(T t);
|
||||
}
|
||||
|
||||
@SuppressWarnings("NonApiType")
|
||||
public static <T> ArrayList<T> newListWith(Collection<? extends T> collection) {
|
||||
if (collection == null) {
|
||||
return null;
|
||||
|
|
|
@ -26,12 +26,12 @@ public final class Pair<F, S> {
|
|||
this.second = second;
|
||||
}
|
||||
|
||||
public static <F extends Object, S extends Object> Pair<F, S> create(F first, S second) {
|
||||
public static <F, S> Pair<F, S> create(F first, S second) {
|
||||
return new Pair<>(first, second);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ReturnValueIgnored")
|
||||
public static <F extends Object, S extends Object> Pair<F, S> createAndInitHashCode(F first, S second) {
|
||||
public static <F, S> Pair<F, S> createAndInitHashCode(F first, S second) {
|
||||
Pair<F, S> pair = new Pair<>(first, second);
|
||||
pair.hashCode();
|
||||
return pair;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2019 Florian Schmaus.
|
||||
* Copyright 2019-2024 Florian Schmaus.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -26,6 +26,7 @@ public class SecurityUtil {
|
|||
|
||||
private static final LruCache<Class<? extends Provider>, Void> INSERTED_PROVIDERS_CACHE = new LruCache<>(8);
|
||||
|
||||
@SuppressWarnings("LockOnNonEnclosingClassLiteral")
|
||||
public static void ensureProviderAtFirstPosition(Class<? extends Provider> providerClass) {
|
||||
if (INSERTED_PROVIDERS_CACHE.containsKey(providerClass)) {
|
||||
return;
|
||||
|
@ -41,7 +42,7 @@ public class SecurityUtil {
|
|||
|
||||
String providerName = provider.getName();
|
||||
|
||||
int installedPosition ;
|
||||
int installedPosition;
|
||||
synchronized (Security.class) {
|
||||
Security.removeProvider(providerName);
|
||||
installedPosition = Security.insertProviderAt(provider, 1);
|
||||
|
|
|
@ -464,7 +464,7 @@ public class StringUtils {
|
|||
appendTo(collection, ", ", sb);
|
||||
}
|
||||
|
||||
public static <O extends Object> void appendTo(Collection<O> collection, StringBuilder sb,
|
||||
public static <O> void appendTo(Collection<O> collection, StringBuilder sb,
|
||||
Consumer<O> appendFunction) {
|
||||
appendTo(collection, ", ", sb, appendFunction);
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ public class StringUtils {
|
|||
appendTo(collection, delimiter, sb, o -> sb.append(o));
|
||||
}
|
||||
|
||||
public static <O extends Object> void appendTo(Collection<O> collection, String delimiter, StringBuilder sb,
|
||||
public static <O> void appendTo(Collection<O> collection, String delimiter, StringBuilder sb,
|
||||
Consumer<O> appendFunction) {
|
||||
for (Iterator<O> it = collection.iterator(); it.hasNext();) {
|
||||
O cs = it.next();
|
||||
|
|
|
@ -185,7 +185,7 @@ public class OmemoClient {
|
|||
|
||||
BareJid contact = JidCreate.bareFrom(com[1]);
|
||||
|
||||
HashMap<OmemoDevice, OmemoFingerprint> devices;
|
||||
Map<OmemoDevice, OmemoFingerprint> devices;
|
||||
try {
|
||||
devices = omemoManager.getActiveFingerprints(contact);
|
||||
} catch (CorruptedOmemoKeyException | CannotEstablishOmemoSessionException | SmackException.NoResponseException e) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* MUC Light room configuration class.
|
||||
|
@ -28,7 +28,7 @@ public class MUCLightRoomConfiguration {
|
|||
|
||||
private final String roomName;
|
||||
private final String subject;
|
||||
private final HashMap<String, String> customConfigs;
|
||||
private final Map<String, String> customConfigs;
|
||||
|
||||
/**
|
||||
* MUC Light room configuration model constructor.
|
||||
|
@ -37,7 +37,7 @@ public class MUCLightRoomConfiguration {
|
|||
* @param subject TODO javadoc me please
|
||||
* @param customConfigs TODO javadoc me please
|
||||
*/
|
||||
public MUCLightRoomConfiguration(String roomName, String subject, HashMap<String, String> customConfigs) {
|
||||
public MUCLightRoomConfiguration(String roomName, String subject, Map<String, String> customConfigs) {
|
||||
this.roomName = roomName;
|
||||
this.subject = subject;
|
||||
this.customConfigs = customConfigs;
|
||||
|
@ -66,7 +66,7 @@ public class MUCLightRoomConfiguration {
|
|||
*
|
||||
* @return the custom configurations of the room.
|
||||
*/
|
||||
public HashMap<String, String> getCustomConfigs() {
|
||||
public Map<String, String> getCustomConfigs() {
|
||||
return customConfigs;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jxmpp.jid.Jid;
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class MUCLightRoomInfo {
|
|||
private final String version;
|
||||
private final Jid room;
|
||||
private final MUCLightRoomConfiguration configuration;
|
||||
private final HashMap<Jid, MUCLightAffiliation> occupants;
|
||||
private final Map<Jid, MUCLightAffiliation> occupants;
|
||||
|
||||
/**
|
||||
* MUC Light room info model constructor.
|
||||
|
@ -41,7 +41,7 @@ public class MUCLightRoomInfo {
|
|||
* @param occupants TODO javadoc me please
|
||||
*/
|
||||
public MUCLightRoomInfo(String version, Jid roomJid, MUCLightRoomConfiguration configuration,
|
||||
HashMap<Jid, MUCLightAffiliation> occupants) {
|
||||
Map<Jid, MUCLightAffiliation> occupants) {
|
||||
this.version = version;
|
||||
this.room = roomJid;
|
||||
this.configuration = configuration;
|
||||
|
@ -80,7 +80,7 @@ public class MUCLightRoomInfo {
|
|||
*
|
||||
* @return the occupants of the room.
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getOccupants() {
|
||||
public Map<Jid, MUCLightAffiliation> getOccupants() {
|
||||
return occupants;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.jivesoftware.smackx.muclight;
|
|||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
|
@ -279,7 +280,7 @@ public class MultiUserChatLight {
|
|||
* @param occupants TODO javadoc me please
|
||||
* @throws Exception TODO javadoc me please
|
||||
*/
|
||||
public void create(String roomName, String subject, HashMap<String, String> customConfigs, List<Jid> occupants)
|
||||
public void create(String roomName, String subject, Map<String, String> customConfigs, List<Jid> occupants)
|
||||
throws Exception {
|
||||
MUCLightCreateIQ createMUCLightIQ = new MUCLightCreateIQ(room, roomName, occupants);
|
||||
|
||||
|
@ -313,7 +314,7 @@ public class MultiUserChatLight {
|
|||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
*/
|
||||
public void leave() throws NotConnectedException, InterruptedException, NoResponseException, XMPPErrorException {
|
||||
HashMap<Jid, MUCLightAffiliation> affiliations = new HashMap<>();
|
||||
Map<Jid, MUCLightAffiliation> affiliations = new HashMap<>();
|
||||
affiliations.put(connection.getUser(), MUCLightAffiliation.none);
|
||||
|
||||
MUCLightChangeAffiliationsIQ changeAffiliationsIQ = new MUCLightChangeAffiliationsIQ(room, affiliations);
|
||||
|
@ -402,7 +403,7 @@ public class MultiUserChatLight {
|
|||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getAffiliations(String version)
|
||||
public Map<Jid, MUCLightAffiliation> getAffiliations(String version)
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
MUCLightGetAffiliationsIQ mucLightGetAffiliationsIQ = new MUCLightGetAffiliationsIQ(room, version);
|
||||
|
||||
|
@ -421,7 +422,7 @@ public class MultiUserChatLight {
|
|||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getAffiliations()
|
||||
public Map<Jid, MUCLightAffiliation> getAffiliations()
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return getAffiliations(null);
|
||||
}
|
||||
|
@ -435,7 +436,7 @@ public class MultiUserChatLight {
|
|||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void changeAffiliations(HashMap<Jid, MUCLightAffiliation> affiliations)
|
||||
public void changeAffiliations(Map<Jid, MUCLightAffiliation> affiliations)
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
MUCLightChangeAffiliationsIQ changeAffiliationsIQ = new MUCLightChangeAffiliationsIQ(room, affiliations);
|
||||
connection.sendIqRequestAndWaitForResponse(changeAffiliationsIQ);
|
||||
|
@ -498,7 +499,7 @@ public class MultiUserChatLight {
|
|||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void setRoomConfigs(HashMap<String, String> customConfigs)
|
||||
public void setRoomConfigs(Map<String, String> customConfigs)
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
setRoomConfigs(null, customConfigs);
|
||||
}
|
||||
|
@ -513,7 +514,7 @@ public class MultiUserChatLight {
|
|||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void setRoomConfigs(String roomName, HashMap<String, String> customConfigs)
|
||||
public void setRoomConfigs(String roomName, Map<String, String> customConfigs)
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
MUCLightSetConfigsIQ mucLightSetConfigIQ = new MUCLightSetConfigsIQ(room, roomName, customConfigs);
|
||||
connection.sendIqRequestAndWaitForResponse(mucLightSetConfigIQ);
|
||||
|
|
|
@ -274,7 +274,7 @@ public final class MultiUserChatLightManager extends Manager {
|
|||
sendBlockRooms(mucLightService, rooms);
|
||||
}
|
||||
|
||||
private void sendBlockRooms(DomainBareJid mucLightService, HashMap<Jid, Boolean> rooms)
|
||||
private void sendBlockRooms(DomainBareJid mucLightService, Map<Jid, Boolean> rooms)
|
||||
throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
|
||||
MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(rooms, null);
|
||||
mucLightBlockingIQ.setType(IQ.Type.set);
|
||||
|
@ -318,7 +318,7 @@ public final class MultiUserChatLightManager extends Manager {
|
|||
sendBlockUsers(mucLightService, users);
|
||||
}
|
||||
|
||||
private void sendBlockUsers(DomainBareJid mucLightService, HashMap<Jid, Boolean> users)
|
||||
private void sendBlockUsers(DomainBareJid mucLightService, Map<Jid, Boolean> users)
|
||||
throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
|
||||
MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(null, users);
|
||||
mucLightBlockingIQ.setType(IQ.Type.set);
|
||||
|
@ -362,7 +362,7 @@ public final class MultiUserChatLightManager extends Manager {
|
|||
sendUnblockRooms(mucLightService, rooms);
|
||||
}
|
||||
|
||||
private void sendUnblockRooms(DomainBareJid mucLightService, HashMap<Jid, Boolean> rooms)
|
||||
private void sendUnblockRooms(DomainBareJid mucLightService, Map<Jid, Boolean> rooms)
|
||||
throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
|
||||
MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(rooms, null);
|
||||
mucLightBlockingIQ.setType(IQ.Type.set);
|
||||
|
@ -406,7 +406,7 @@ public final class MultiUserChatLightManager extends Manager {
|
|||
sendUnblockUsers(mucLightService, users);
|
||||
}
|
||||
|
||||
private void sendUnblockUsers(DomainBareJid mucLightService, HashMap<Jid, Boolean> users)
|
||||
private void sendUnblockUsers(DomainBareJid mucLightService, Map<Jid, Boolean> users)
|
||||
throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
|
||||
MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(null, users);
|
||||
mucLightBlockingIQ.setType(IQ.Type.set);
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -40,7 +39,7 @@ public class MUCLightAffiliationsIQ extends IQ {
|
|||
public static final String NAMESPACE = MultiUserChatLight.NAMESPACE + MultiUserChatLight.AFFILIATIONS;
|
||||
|
||||
private final String version;
|
||||
private HashMap<Jid, MUCLightAffiliation> affiliations;
|
||||
private Map<Jid, MUCLightAffiliation> affiliations;
|
||||
|
||||
/**
|
||||
* MUC Light affiliations response IQ constructor.
|
||||
|
@ -49,7 +48,7 @@ public class MUCLightAffiliationsIQ extends IQ {
|
|||
* @param affiliations TODO javadoc me please
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public MUCLightAffiliationsIQ(String version, HashMap<Jid, MUCLightAffiliation> affiliations) {
|
||||
public MUCLightAffiliationsIQ(String version, Map<Jid, MUCLightAffiliation> affiliations) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.version = version;
|
||||
this.affiliations = affiliations;
|
||||
|
@ -83,7 +82,7 @@ public class MUCLightAffiliationsIQ extends IQ {
|
|||
*
|
||||
* @return the affiliations of the room
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getAffiliations() {
|
||||
public Map<Jid, MUCLightAffiliation> getAffiliations() {
|
||||
return affiliations;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -38,8 +37,8 @@ public class MUCLightBlockingIQ extends IQ {
|
|||
public static final String ELEMENT = QUERY_ELEMENT;
|
||||
public static final String NAMESPACE = MultiUserChatLight.NAMESPACE + MultiUserChatLight.BLOCKING;
|
||||
|
||||
private final HashMap<Jid, Boolean> rooms;
|
||||
private final HashMap<Jid, Boolean> users;
|
||||
private final Map<Jid, Boolean> rooms;
|
||||
private final Map<Jid, Boolean> users;
|
||||
|
||||
/**
|
||||
* MUC Light blocking IQ constructor.
|
||||
|
@ -47,7 +46,7 @@ public class MUCLightBlockingIQ extends IQ {
|
|||
* @param rooms TODO javadoc me please
|
||||
* @param users TODO javadoc me please
|
||||
*/
|
||||
public MUCLightBlockingIQ(HashMap<Jid, Boolean> rooms, HashMap<Jid, Boolean> users) {
|
||||
public MUCLightBlockingIQ(Map<Jid, Boolean> rooms, Map<Jid, Boolean> users) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.rooms = rooms;
|
||||
this.users = users;
|
||||
|
@ -58,7 +57,7 @@ public class MUCLightBlockingIQ extends IQ {
|
|||
*
|
||||
* @return the rooms JIDs with booleans (true if allow, false if deny)
|
||||
*/
|
||||
public HashMap<Jid, Boolean> getRooms() {
|
||||
public Map<Jid, Boolean> getRooms() {
|
||||
return rooms;
|
||||
}
|
||||
|
||||
|
@ -67,7 +66,7 @@ public class MUCLightBlockingIQ extends IQ {
|
|||
*
|
||||
* @return the users JIDs with booleans (true if allow, false if deny)
|
||||
*/
|
||||
public HashMap<Jid, Boolean> getUsers() {
|
||||
public Map<Jid, Boolean> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
|
@ -86,7 +85,7 @@ public class MUCLightBlockingIQ extends IQ {
|
|||
return xml;
|
||||
}
|
||||
|
||||
private static void parseBlocking(IQChildElementXmlStringBuilder xml, HashMap<Jid, Boolean> map, boolean isRoom) {
|
||||
private static void parseBlocking(IQChildElementXmlStringBuilder xml, Map<Jid, Boolean> map, boolean isRoom) {
|
||||
Iterator<Map.Entry<Jid, Boolean>> it = map.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<Jid, Boolean> pair = it.next();
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -39,7 +38,7 @@ public class MUCLightChangeAffiliationsIQ extends IQ {
|
|||
public static final String ELEMENT = QUERY_ELEMENT;
|
||||
public static final String NAMESPACE = MultiUserChatLight.NAMESPACE + MultiUserChatLight.AFFILIATIONS;
|
||||
|
||||
private HashMap<Jid, MUCLightAffiliation> affiliations;
|
||||
private Map<Jid, MUCLightAffiliation> affiliations;
|
||||
|
||||
/**
|
||||
* MUCLight change affiliations IQ constructor.
|
||||
|
@ -48,7 +47,7 @@ public class MUCLightChangeAffiliationsIQ extends IQ {
|
|||
* @param affiliations TODO javadoc me please
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public MUCLightChangeAffiliationsIQ(Jid room, HashMap<Jid, MUCLightAffiliation> affiliations) {
|
||||
public MUCLightChangeAffiliationsIQ(Jid room, Map<Jid, MUCLightAffiliation> affiliations) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.setType(Type.set);
|
||||
this.setTo(room);
|
||||
|
@ -60,7 +59,7 @@ public class MUCLightChangeAffiliationsIQ extends IQ {
|
|||
*
|
||||
* @return the affiliations
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getAffiliations() {
|
||||
public Map<Jid, MUCLightAffiliation> getAffiliations() {
|
||||
return affiliations;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.jivesoftware.smackx.muclight.element;
|
|||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
|
@ -42,7 +43,7 @@ public class MUCLightCreateIQ extends IQ {
|
|||
public static final String NAMESPACE = MultiUserChatLight.NAMESPACE + MultiUserChatLight.CREATE;
|
||||
|
||||
private MUCLightRoomConfiguration configuration;
|
||||
private final HashMap<Jid, MUCLightAffiliation> occupants;
|
||||
private final Map<Jid, MUCLightAffiliation> occupants;
|
||||
|
||||
/**
|
||||
* MUCLight create IQ constructor.
|
||||
|
@ -54,7 +55,7 @@ public class MUCLightCreateIQ extends IQ {
|
|||
* @param occupants TODO javadoc me please
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public MUCLightCreateIQ(EntityJid room, String roomName, String subject, HashMap<String, String> customConfigs,
|
||||
public MUCLightCreateIQ(EntityJid room, String roomName, String subject, Map<String, String> customConfigs,
|
||||
List<Jid> occupants) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.configuration = new MUCLightRoomConfiguration(roomName, subject, customConfigs);
|
||||
|
@ -93,7 +94,7 @@ public class MUCLightCreateIQ extends IQ {
|
|||
*
|
||||
* @return the room occupants
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getOccupants() {
|
||||
public Map<Jid, MUCLightAffiliation> getOccupants() {
|
||||
return occupants;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -48,11 +47,11 @@ public abstract class MUCLightElements {
|
|||
public static final String NAMESPACE = MultiUserChatLight.NAMESPACE + MultiUserChatLight.AFFILIATIONS;
|
||||
public static final QName QNAME = new QName(NAMESPACE, ELEMENT);
|
||||
|
||||
private final HashMap<Jid, MUCLightAffiliation> affiliations;
|
||||
private final Map<Jid, MUCLightAffiliation> affiliations;
|
||||
private final String prevVersion;
|
||||
private final String version;
|
||||
|
||||
public AffiliationsChangeExtension(HashMap<Jid, MUCLightAffiliation> affiliations, String prevVersion,
|
||||
public AffiliationsChangeExtension(Map<Jid, MUCLightAffiliation> affiliations, String prevVersion,
|
||||
String version) {
|
||||
this.affiliations = affiliations;
|
||||
this.prevVersion = prevVersion;
|
||||
|
@ -74,7 +73,7 @@ public abstract class MUCLightElements {
|
|||
*
|
||||
* @return the affiliations
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getAffiliations() {
|
||||
public Map<Jid, MUCLightAffiliation> getAffiliations() {
|
||||
return affiliations;
|
||||
}
|
||||
|
||||
|
@ -135,7 +134,7 @@ public abstract class MUCLightElements {
|
|||
private final String version;
|
||||
private final String roomName;
|
||||
private final String subject;
|
||||
private final HashMap<String, String> customConfigs;
|
||||
private final Map<String, String> customConfigs;
|
||||
|
||||
/**
|
||||
* Configurations change extension constructor.
|
||||
|
@ -147,7 +146,7 @@ public abstract class MUCLightElements {
|
|||
* @param customConfigs TODO javadoc me please
|
||||
*/
|
||||
public ConfigurationsChangeExtension(String prevVersion, String version, String roomName, String subject,
|
||||
HashMap<String, String> customConfigs) {
|
||||
Map<String, String> customConfigs) {
|
||||
this.prevVersion = prevVersion;
|
||||
this.version = version;
|
||||
this.roomName = roomName;
|
||||
|
@ -206,7 +205,7 @@ public abstract class MUCLightElements {
|
|||
*
|
||||
* @return the room custom configurations
|
||||
*/
|
||||
public HashMap<String, String> getCustomConfigs() {
|
||||
public Map<String, String> getCustomConfigs() {
|
||||
return customConfigs;
|
||||
}
|
||||
|
||||
|
@ -287,14 +286,14 @@ public abstract class MUCLightElements {
|
|||
*/
|
||||
public static class OccupantsElement implements Element {
|
||||
|
||||
private HashMap<Jid, MUCLightAffiliation> occupants;
|
||||
private Map<Jid, MUCLightAffiliation> occupants;
|
||||
|
||||
/**
|
||||
* Occupants element constructor.
|
||||
*
|
||||
* @param occupants TODO javadoc me please
|
||||
*/
|
||||
public OccupantsElement(HashMap<Jid, MUCLightAffiliation> occupants) {
|
||||
public OccupantsElement(Map<Jid, MUCLightAffiliation> occupants) {
|
||||
this.occupants = occupants;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class MUCLightInfoIQ extends IQ {
|
|||
|
||||
private final String version;
|
||||
private final MUCLightRoomConfiguration configuration;
|
||||
private final HashMap<Jid, MUCLightAffiliation> occupants;
|
||||
private final Map<Jid, MUCLightAffiliation> occupants;
|
||||
|
||||
/**
|
||||
* MUCLight info response IQ constructor.
|
||||
|
@ -51,7 +51,7 @@ public class MUCLightInfoIQ extends IQ {
|
|||
* @param occupants TODO javadoc me please
|
||||
*/
|
||||
public MUCLightInfoIQ(String version, MUCLightRoomConfiguration configuration,
|
||||
HashMap<Jid, MUCLightAffiliation> occupants) {
|
||||
Map<Jid, MUCLightAffiliation> occupants) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.version = version;
|
||||
this.configuration = configuration;
|
||||
|
@ -90,7 +90,7 @@ public class MUCLightInfoIQ extends IQ {
|
|||
*
|
||||
* @return the occupants of the room
|
||||
*/
|
||||
public HashMap<Jid, MUCLightAffiliation> getOccupants() {
|
||||
public Map<Jid, MUCLightAffiliation> getOccupants() {
|
||||
return occupants;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muclight.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -39,7 +38,7 @@ public class MUCLightSetConfigsIQ extends IQ {
|
|||
|
||||
private String roomName;
|
||||
private String subject;
|
||||
private HashMap<String, String> customConfigs;
|
||||
private Map<String, String> customConfigs;
|
||||
|
||||
/**
|
||||
* MUC Light set configuration IQ constructor.
|
||||
|
@ -50,7 +49,7 @@ public class MUCLightSetConfigsIQ extends IQ {
|
|||
* @param customConfigs TODO javadoc me please
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public MUCLightSetConfigsIQ(Jid roomJid, String roomName, String subject, HashMap<String, String> customConfigs) {
|
||||
public MUCLightSetConfigsIQ(Jid roomJid, String roomName, String subject, Map<String, String> customConfigs) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.roomName = roomName;
|
||||
this.subject = subject;
|
||||
|
@ -66,7 +65,7 @@ public class MUCLightSetConfigsIQ extends IQ {
|
|||
* @param roomName TODO javadoc me please
|
||||
* @param customConfigs TODO javadoc me please
|
||||
*/
|
||||
public MUCLightSetConfigsIQ(Jid roomJid, String roomName, HashMap<String, String> customConfigs) {
|
||||
public MUCLightSetConfigsIQ(Jid roomJid, String roomName, Map<String, String> customConfigs) {
|
||||
this(roomJid, roomName, null, customConfigs);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.jivesoftware.smackx.muclight.provider;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.IqData;
|
||||
|
@ -42,8 +43,8 @@ public class MUCLightBlockingIQProvider extends IqProvider<MUCLightBlockingIQ> {
|
|||
|
||||
@Override
|
||||
public MUCLightBlockingIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
|
||||
HashMap<Jid, Boolean> rooms = null;
|
||||
HashMap<Jid, Boolean> users = null;
|
||||
Map<Jid, Boolean> rooms = null;
|
||||
Map<Jid, Boolean> users = null;
|
||||
|
||||
outerloop: while (true) {
|
||||
XmlPullParser.Event eventType = parser.next();
|
||||
|
@ -70,7 +71,7 @@ public class MUCLightBlockingIQProvider extends IqProvider<MUCLightBlockingIQ> {
|
|||
return mucLightBlockingIQ;
|
||||
}
|
||||
|
||||
private static HashMap<Jid, Boolean> parseBlocking(XmlPullParser parser, HashMap<Jid, Boolean> map)
|
||||
private static Map<Jid, Boolean> parseBlocking(XmlPullParser parser, Map<Jid, Boolean> map)
|
||||
throws XmppStringprepException, XmlPullParserException, IOException {
|
||||
if (map == null) {
|
||||
map = new HashMap<>();
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.jivesoftware.smackx.muclight.provider;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.IqData;
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
|
@ -45,8 +46,8 @@ public class MUCLightInfoIQProvider extends IqProvider<MUCLightInfoIQ> {
|
|||
String version = null;
|
||||
String roomName = null;
|
||||
String subject = null;
|
||||
HashMap<String, String> customConfigs = null;
|
||||
HashMap<Jid, MUCLightAffiliation> occupants = new HashMap<>();
|
||||
Map<String, String> customConfigs = null;
|
||||
Map<Jid, MUCLightAffiliation> occupants = new HashMap<>();
|
||||
|
||||
outerloop: while (true) {
|
||||
XmlPullParser.Event eventType = parser.next();
|
||||
|
@ -97,8 +98,8 @@ public class MUCLightInfoIQProvider extends IqProvider<MUCLightInfoIQ> {
|
|||
return new MUCLightInfoIQ(version, new MUCLightRoomConfiguration(roomName, subject, customConfigs), occupants);
|
||||
}
|
||||
|
||||
private static HashMap<Jid, MUCLightAffiliation> iterateOccupants(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
HashMap<Jid, MUCLightAffiliation> occupants = new HashMap<>();
|
||||
private static Map<Jid, MUCLightAffiliation> iterateOccupants(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
Map<Jid, MUCLightAffiliation> occupants = new HashMap<>();
|
||||
int depth = parser.getDepth();
|
||||
|
||||
outerloop: while (true) {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.push_notifications;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
|
@ -122,7 +121,7 @@ public final class PushNotificationsManager extends Manager {
|
|||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public boolean enable(Jid pushJid, String node, HashMap<String, String> publishOptions)
|
||||
public boolean enable(Jid pushJid, String node, Map<String, String> publishOptions)
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
EnablePushNotificationsIQ enablePushNotificationsIQ = new EnablePushNotificationsIQ(pushJid, node,
|
||||
publishOptions);
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.push_notifications.element;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -51,10 +50,10 @@ public class EnablePushNotificationsIQ extends IQ {
|
|||
|
||||
private final Jid jid;
|
||||
private final String node;
|
||||
private final HashMap<String, String> publishOptions;
|
||||
private final Map<String, String> publishOptions;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public EnablePushNotificationsIQ(Jid jid, String node, HashMap<String, String> publishOptions) {
|
||||
public EnablePushNotificationsIQ(Jid jid, String node, Map<String, String> publishOptions) {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
this.jid = jid;
|
||||
this.node = node;
|
||||
|
@ -89,7 +88,7 @@ public class EnablePushNotificationsIQ extends IQ {
|
|||
*
|
||||
* @return the publish options
|
||||
*/
|
||||
public HashMap<String, String> getPublishOptions() {
|
||||
public Map<String, String> getPublishOptions() {
|
||||
return publishOptions;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.jivesoftware.smackx.muclight;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
|
@ -55,7 +55,7 @@ public class MUCLightAffiliationsChangeExtensionTest {
|
|||
AffiliationsChangeExtension affiliationsChangeExtension = AffiliationsChangeExtension
|
||||
.from(changeAffiliationsMessage);
|
||||
|
||||
HashMap<Jid, MUCLightAffiliation> affiliations = affiliationsChangeExtension.getAffiliations();
|
||||
Map<Jid, MUCLightAffiliation> affiliations = affiliationsChangeExtension.getAffiliations();
|
||||
assertEquals(affiliations.size(), 3);
|
||||
assertEquals(affiliations.get(JidCreate.from("sarasa2@shakespeare.lit")), MUCLightAffiliation.owner);
|
||||
assertEquals(affiliations.get(JidCreate.from("sarasa1@shakespeare.lit")), MUCLightAffiliation.member);
|
||||
|
@ -68,7 +68,7 @@ public class MUCLightAffiliationsChangeExtensionTest {
|
|||
AffiliationsChangeExtension affiliationsChangeExtension = AffiliationsChangeExtension
|
||||
.from(changeAffiliationsMessage);
|
||||
|
||||
HashMap<Jid, MUCLightAffiliation> affiliations = affiliationsChangeExtension.getAffiliations();
|
||||
Map<Jid, MUCLightAffiliation> affiliations = affiliationsChangeExtension.getAffiliations();
|
||||
assertEquals(affiliations.size(), 2);
|
||||
assertEquals(affiliations.get(JidCreate.from("sarasa1@shakespeare.lit")), MUCLightAffiliation.member);
|
||||
assertEquals(affiliations.get(JidCreate.from("sarasa3@shakespeare.lit")), MUCLightAffiliation.none);
|
||||
|
@ -83,7 +83,7 @@ public class MUCLightAffiliationsChangeExtensionTest {
|
|||
AffiliationsChangeExtension affiliationsChangeExtension = AffiliationsChangeExtension
|
||||
.from(changeAffiliationsMessage);
|
||||
|
||||
HashMap<Jid, MUCLightAffiliation> affiliations = affiliationsChangeExtension.getAffiliations();
|
||||
Map<Jid, MUCLightAffiliation> affiliations = affiliationsChangeExtension.getAffiliations();
|
||||
assertEquals(affiliations.size(), 2);
|
||||
assertEquals(affiliations.get(JidCreate.from("sarasa2@shakespeare.lit")), MUCLightAffiliation.owner);
|
||||
assertEquals(affiliations.get(JidCreate.from("sarasa1@shakespeare.lit")), MUCLightAffiliation.member);
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.jivesoftware.smackx.muclight;
|
|||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
|
@ -32,7 +33,7 @@ public class MUCLightChangeAffiliationsIQTest {
|
|||
|
||||
@Test
|
||||
public void checkChangeAffiliationsMUCLightStanza() throws Exception {
|
||||
HashMap<Jid, MUCLightAffiliation> affiliations = new HashMap<>();
|
||||
Map<Jid, MUCLightAffiliation> affiliations = new HashMap<>();
|
||||
affiliations.put(JidCreate.from("sarasa2@shakespeare.lit"), MUCLightAffiliation.owner);
|
||||
affiliations.put(JidCreate.from("sarasa1@shakespeare.lit"), MUCLightAffiliation.member);
|
||||
affiliations.put(JidCreate.from("sarasa3@shakespeare.lit"), MUCLightAffiliation.none);
|
||||
|