mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02: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
|
@ -28,6 +28,7 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
@ -787,6 +788,6 @@ public final class Configuration {
|
|||
if (specification == null || specification.isBlank()) {
|
||||
return null;
|
||||
}
|
||||
return specification.replaceAll("[\\s-]", "").toUpperCase();
|
||||
return specification.replaceAll("[\\s-]", "").toUpperCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class HttpFileUploadIntegrationTest extends AbstractSmackIntegrationTest
|
|||
URL getUrl = hfumOne.uploadFile(file, new UploadProgressListener() {
|
||||
@Override
|
||||
public void onUploadProgress(long uploadedBytes, long totalBytes) {
|
||||
double progress = uploadedBytes / totalBytes;
|
||||
double progress = uploadedBytes / ((double) totalBytes);
|
||||
LOGGER.fine("HTTP File Upload progress " + progress + "% (" + uploadedBytes + '/' + totalBytes + ')');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,8 +21,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
|||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
|
@ -54,7 +54,7 @@ public class OmemoManagerSetupHelper {
|
|||
}
|
||||
|
||||
alice.requestDeviceListUpdateFor(bob.getOwnJid());
|
||||
HashMap<OmemoDevice, OmemoFingerprint> fingerprints = alice.getActiveFingerprints(bob.getOwnJid());
|
||||
Map<OmemoDevice, OmemoFingerprint> fingerprints = alice.getActiveFingerprints(bob.getOwnJid());
|
||||
|
||||
for (OmemoDevice device : fingerprints.keySet()) {
|
||||
OmemoFingerprint fingerprint = fingerprints.get(device);
|
||||
|
@ -67,7 +67,7 @@ public class OmemoManagerSetupHelper {
|
|||
SmackException.NoResponseException, CannotEstablishOmemoSessionException, CorruptedOmemoKeyException,
|
||||
XMPPException.XMPPErrorException, PubSubException.NotALeafNodeException, IOException {
|
||||
alice.requestDeviceListUpdateFor(bob.getOwnJid());
|
||||
HashMap<OmemoDevice, OmemoFingerprint> fps1 = alice.getActiveFingerprints(bob.getOwnJid());
|
||||
Map<OmemoDevice, OmemoFingerprint> fps1 = alice.getActiveFingerprints(bob.getOwnJid());
|
||||
|
||||
assertFalse(fps1.isEmpty());
|
||||
assertAllDevicesAreUndecided(alice, fps1);
|
||||
|
@ -75,7 +75,7 @@ public class OmemoManagerSetupHelper {
|
|||
|
||||
trustAllIdentities(alice, bob);
|
||||
|
||||
HashMap<OmemoDevice, OmemoFingerprint> fps2 = alice.getActiveFingerprints(bob.getOwnJid());
|
||||
Map<OmemoDevice, OmemoFingerprint> fps2 = alice.getActiveFingerprints(bob.getOwnJid());
|
||||
assertEquals(fps1.size(), fps2.size());
|
||||
assertTrue(Maps.difference(fps1, fps2).areEqual());
|
||||
|
||||
|
@ -95,28 +95,28 @@ public class OmemoManagerSetupHelper {
|
|||
return manager;
|
||||
}
|
||||
|
||||
public static void assertAllDevicesAreUndecided(OmemoManager manager, HashMap<OmemoDevice, OmemoFingerprint> devices) {
|
||||
public static void assertAllDevicesAreUndecided(OmemoManager manager, Map<OmemoDevice, OmemoFingerprint> devices) {
|
||||
for (OmemoDevice device : devices.keySet()) {
|
||||
// All fingerprints MUST be neither decided, nor trusted.
|
||||
assertFalse(manager.isDecidedOmemoIdentity(device, devices.get(device)));
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertAllDevicesAreUntrusted(OmemoManager manager, HashMap<OmemoDevice, OmemoFingerprint> devices) {
|
||||
public static void assertAllDevicesAreUntrusted(OmemoManager manager, Map<OmemoDevice, OmemoFingerprint> devices) {
|
||||
for (OmemoDevice device : devices.keySet()) {
|
||||
// All fingerprints MUST be neither decided, nor trusted.
|
||||
assertFalse(manager.isTrustedOmemoIdentity(device, devices.get(device)));
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertAllDevicesAreDecided(OmemoManager manager, HashMap<OmemoDevice, OmemoFingerprint> devices) {
|
||||
public static void assertAllDevicesAreDecided(OmemoManager manager, Map<OmemoDevice, OmemoFingerprint> devices) {
|
||||
for (OmemoDevice device : devices.keySet()) {
|
||||
// All fingerprints MUST be neither decided, nor trusted.
|
||||
assertTrue(manager.isDecidedOmemoIdentity(device, devices.get(device)));
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertAllDevicesAreTrusted(OmemoManager manager, HashMap<OmemoDevice, OmemoFingerprint> devices) {
|
||||
public static void assertAllDevicesAreTrusted(OmemoManager manager, Map<OmemoDevice, OmemoFingerprint> devices) {
|
||||
for (OmemoDevice device : devices.keySet()) {
|
||||
// All fingerprints MUST be neither decided, nor trusted.
|
||||
assertTrue(manager.isTrustedOmemoIdentity(device, devices.get(device)));
|
||||
|
|
|
@ -31,26 +31,26 @@ import org.junit.jupiter.api.Test;
|
|||
public class SmackIntegrationTestFrameWorkTest {
|
||||
|
||||
private static class ValidLowLevelList {
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "MethodCanBeStatic"})
|
||||
public void test(List<AbstractXMPPConnection> connections) {
|
||||
}
|
||||
}
|
||||
|
||||
private static class InvalidLowLevelList {
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "MethodCanBeStatic"})
|
||||
public void test(List<AbstractXMPPConnection> connections, boolean invalid) {
|
||||
}
|
||||
}
|
||||
|
||||
private static class ValidLowLevelVarargs {
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "MethodCanBeStatic"})
|
||||
public void test(AbstractXMPPConnection connectionOne, AbstractXMPPConnection connectionTwo,
|
||||
AbstractXMPPConnection connectionThree) {
|
||||
}
|
||||
}
|
||||
|
||||
private static class InvalidLowLevelVarargs {
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "MethodCanBeStatic"})
|
||||
public void test(AbstractXMPPConnection connectionOne, Integer invalid, AbstractXMPPConnection connectionTwo,
|
||||
AbstractXMPPConnection connectionThree) {
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class SmackIntegrationTestFrameWorkTest {
|
|||
}
|
||||
|
||||
private static class ValidUnconnectedConnectionSource {
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "MethodCanBeStatic"})
|
||||
public void test(AbstractSmackLowLevelIntegrationTest.UnconnectedConnectionSource source) {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue