mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
Bump ErrorProne to 2.5.1 and refactor Providers a bit
This also resulted in a refactoring of the Providers and parsing Exceptions. NumberFormatException and ParseException can now be thrown directly, the wrapping in a SmackParsingException is down at a higher layer, i.e. in AbstractProvider.
This commit is contained in:
parent
1df0763f92
commit
a7b3303f3e
136 changed files with 574 additions and 551 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright © 2014-2017 Florian Schmaus
|
||||
* Copyright © 2014-2021 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -19,7 +19,6 @@ package org.jivesoftware.smackx.ping.android;
|
|||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
@ -113,14 +112,14 @@ public final class ServerPingWithAlarmManager extends Manager {
|
|||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
LOGGER.fine("Ping Alarm broadcast received");
|
||||
Set<Entry<XMPPConnection, ServerPingWithAlarmManager>> managers;
|
||||
Set<Map.Entry<XMPPConnection, ServerPingWithAlarmManager>> managers;
|
||||
synchronized (ServerPingWithAlarmManager.class) {
|
||||
// Make a copy to avoid ConcurrentModificationException when
|
||||
// iterating directly over INSTANCES and the Set is modified
|
||||
// concurrently by creating a new ServerPingWithAlarmManager.
|
||||
managers = new HashSet<>(INSTANCES.entrySet());
|
||||
}
|
||||
for (Entry<XMPPConnection, ServerPingWithAlarmManager> entry : managers) {
|
||||
for (Map.Entry<XMPPConnection, ServerPingWithAlarmManager> entry : managers) {
|
||||
XMPPConnection connection = entry.getKey();
|
||||
if (entry.getValue().isEnabled()) {
|
||||
LOGGER.fine("Calling pingServerIfNecessary for connection "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue