Bump JXMPP to 0.5.0

This commit is contained in:
Florian Schmaus 2017-01-02 09:07:57 +01:00
parent f633313c4a
commit 183c605278
8 changed files with 13 additions and 13 deletions

View File

@ -160,7 +160,7 @@ public abstract class ScramMechanism extends SASLMechanism {
// mechanisms. // mechanisms.
final String cacheKey = password + ',' + salt + ',' + getName(); final String cacheKey = password + ',' + salt + ',' + getName();
byte[] serverKey, clientKey; byte[] serverKey, clientKey;
Keys keys = CACHE.get(cacheKey); Keys keys = CACHE.lookup(cacheKey);
if (keys == null) { if (keys == null) {
// SaltedPassword := Hi(Normalize(password), salt, i) // SaltedPassword := Hi(Normalize(password), salt, i)
byte[] saltedPassword = hi(saslPrep(password), Base64.decode(salt), iterations); byte[] saltedPassword = hi(saslPrep(password), Base64.decode(salt), iterations);

View File

@ -204,7 +204,7 @@ public final class IoTProvisioningManager extends Manager {
// Handle <clearCache/> request. // Handle <clearCache/> request.
Jid from = iqRequest.getFrom(); Jid from = iqRequest.getFrom();
LruCache<BareJid, Void> cache = negativeFriendshipRequestCache.get(from); LruCache<BareJid, Void> cache = negativeFriendshipRequestCache.lookup(from);
if (cache != null) { if (cache != null) {
cache.clear(); cache.clear();
} }
@ -329,7 +329,7 @@ public final class IoTProvisioningManager extends Manager {
* @throws InterruptedException * @throws InterruptedException
*/ */
public boolean isFriend(Jid provisioningServer, BareJid friendInQuestion) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { public boolean isFriend(Jid provisioningServer, BareJid friendInQuestion) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
LruCache<BareJid, Void> cache = negativeFriendshipRequestCache.get(provisioningServer); LruCache<BareJid, Void> cache = negativeFriendshipRequestCache.lookup(provisioningServer);
if (cache != null && cache.containsKey(friendInQuestion)) { if (cache != null && cache.containsKey(friendInQuestion)) {
// We hit a cached negative isFriend response for this provisioning server. // We hit a cached negative isFriend response for this provisioning server.
return false; return false;

View File

@ -304,7 +304,7 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
* @param address the address the connection failure counter should be increased * @param address the address the connection failure counter should be increased
*/ */
private static void incrementConnectionFailures(String address) { private static void incrementConnectionFailures(String address) {
Integer count = ADDRESS_BLACKLIST.get(address); Integer count = ADDRESS_BLACKLIST.lookup(address);
ADDRESS_BLACKLIST.put(address, count == null ? 1 : count + 1); ADDRESS_BLACKLIST.put(address, count == null ? 1 : count + 1);
} }
@ -315,7 +315,7 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
* @return number of connection failures * @return number of connection failures
*/ */
private static int getConnectionFailures(String address) { private static int getConnectionFailures(String address) {
Integer count = ADDRESS_BLACKLIST.get(address); Integer count = ADDRESS_BLACKLIST.lookup(address);
return count != null ? count : 0; return count != null ? count : 0;
} }

View File

@ -160,7 +160,7 @@ public final class EntityCapsManager extends Manager {
* @return the node version (node#ver) or null * @return the node version (node#ver) or null
*/ */
public static String getNodeVersionByJid(Jid jid) { public static String getNodeVersionByJid(Jid jid) {
NodeVerHash nvh = JID_TO_NODEVER_CACHE.get(jid); NodeVerHash nvh = JID_TO_NODEVER_CACHE.lookup(jid);
if (nvh != null) { if (nvh != null) {
return nvh.nodeVer; return nvh.nodeVer;
} else { } else {
@ -169,7 +169,7 @@ public final class EntityCapsManager extends Manager {
} }
public static NodeVerHash getNodeVerHashByJid(Jid jid) { public static NodeVerHash getNodeVerHashByJid(Jid jid) {
return JID_TO_NODEVER_CACHE.get(jid); return JID_TO_NODEVER_CACHE.lookup(jid);
} }
/** /**
@ -182,7 +182,7 @@ public final class EntityCapsManager extends Manager {
* @return the discovered info * @return the discovered info
*/ */
public static DiscoverInfo getDiscoverInfoByUser(Jid user) { public static DiscoverInfo getDiscoverInfoByUser(Jid user) {
NodeVerHash nvh = JID_TO_NODEVER_CACHE.get(user); NodeVerHash nvh = JID_TO_NODEVER_CACHE.lookup(user);
if (nvh == null) if (nvh == null)
return null; return null;
@ -198,7 +198,7 @@ public final class EntityCapsManager extends Manager {
* @return The corresponding DiscoverInfo or null if none is known. * @return The corresponding DiscoverInfo or null if none is known.
*/ */
public static DiscoverInfo getDiscoveryInfoByNodeVer(String nodeVer) { public static DiscoverInfo getDiscoveryInfoByNodeVer(String nodeVer) {
DiscoverInfo info = CAPS_CACHE.get(nodeVer); DiscoverInfo info = CAPS_CACHE.lookup(nodeVer);
// If it was not in CAPS_CACHE, try to retrieve the information from persistentCache // If it was not in CAPS_CACHE, try to retrieve the information from persistentCache
if (info == null && persistentCache != null) { if (info == null && persistentCache != null) {

View File

@ -730,7 +730,7 @@ public final class ServiceDiscoveryManager extends Manager {
List<DiscoverInfo> serviceDiscoInfo = null; List<DiscoverInfo> serviceDiscoInfo = null;
DomainBareJid serviceName = connection().getXMPPServiceDomain(); DomainBareJid serviceName = connection().getXMPPServiceDomain();
if (useCache) { if (useCache) {
serviceDiscoInfo = services.get(feature); serviceDiscoInfo = services.lookup(feature);
if (serviceDiscoInfo != null) { if (serviceDiscoInfo != null) {
return serviceDiscoInfo; return serviceDiscoInfo;
} }

View File

@ -335,7 +335,7 @@ public final class Roster extends Manager {
private Map<Resourcepart, Presence> getPresencesInternal(BareJid entity) { private Map<Resourcepart, Presence> getPresencesInternal(BareJid entity) {
Map<Resourcepart, Presence> entityPresences = presenceMap.get(entity); Map<Resourcepart, Presence> entityPresences = presenceMap.get(entity);
if (entityPresences == null) { if (entityPresences == null) {
entityPresences = nonRosterPresenceMap.get(entity); entityPresences = nonRosterPresenceMap.lookup(entity);
} }
return entityPresences; return entityPresences;
} }

View File

@ -193,7 +193,7 @@ public class EntityCapsTest extends AbstractSmackIntegrationTest {
String u1ver = EntityCapsManager.getNodeVersionByJid(conTwo.getUser()); String u1ver = EntityCapsManager.getNodeVersionByJid(conTwo.getUser());
assertNotNull(u1ver); assertNotNull(u1ver);
DiscoverInfo entityInfo = EntityCapsManager.CAPS_CACHE.get(u1ver); DiscoverInfo entityInfo = EntityCapsManager.CAPS_CACHE.lookup(u1ver);
assertNotNull(entityInfo); assertNotNull(entityInfo);
assertEquals(info.toXML(), entityInfo.toXML()); assertEquals(info.toXML(), entityInfo.toXML());

View File

@ -2,7 +2,7 @@ allprojects {
ext { ext {
shortVersion = '4.2.0-beta4' shortVersion = '4.2.0-beta4'
isSnapshot = true isSnapshot = true
jxmppVersion = '0.5.0-alpha7' jxmppVersion = '0.5.0'
smackMinAndroidSdk = 8 smackMinAndroidSdk = 8
} }
} }