mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +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
|
@ -187,7 +187,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
/**
|
||||
* The stream ID of the stream that is currently resumable, ie. the stream we hold the state
|
||||
* for in {@link #clientHandledStanzasCount}, {@link #serverHandledStanzasCount} and
|
||||
* {@link #unFailedNonzaExceptionacknowledgedStanzas}.
|
||||
* {@link #unacknowledgedStanzas}.
|
||||
*/
|
||||
private String smSessionId;
|
||||
|
||||
|
@ -668,8 +668,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
* Initializes the connection by creating a stanza reader and writer and opening a
|
||||
* XMPP stream to the server.
|
||||
*
|
||||
* @throws XMPPException if establishing a connection to the server fails.
|
||||
* @throws SmackException if the server fails to respond back or if there is anther error.
|
||||
* @throws IOException if an I/O error occurred.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
|
|
|
@ -33,7 +33,6 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
@ -115,7 +114,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
|||
private Iterator<CharSequence> outgoingCharSequenceIterator;
|
||||
|
||||
private final List<TopLevelStreamElement> currentlyOutgoingElements = new ArrayList<>();
|
||||
private final Map<ByteBuffer, List<TopLevelStreamElement>> bufferToElementMap = new IdentityHashMap<>();
|
||||
private final IdentityHashMap<ByteBuffer, List<TopLevelStreamElement>> bufferToElementMap = new IdentityHashMap<>();
|
||||
|
||||
private ByteBuffer outgoingBuffer;
|
||||
private ByteBuffer filteredOutgoingBuffer;
|
||||
|
@ -224,7 +223,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
|||
}
|
||||
streamOpen.append("stream");
|
||||
streamClose.append("stream>");
|
||||
for (Entry<String, String> entry : attributes.entrySet()) {
|
||||
for (Map.Entry<String, String> entry : attributes.entrySet()) {
|
||||
String attributeName = entry.getKey();
|
||||
String attributeValue = entry.getValue();
|
||||
switch (attributeName) {
|
||||
|
@ -571,7 +570,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
|||
|
||||
final class XmppTcpNioTransport extends XmppClientToServerTransport {
|
||||
|
||||
protected XmppTcpNioTransport(ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
XmppTcpNioTransport(ModularXmppClientToServerConnectionInternal connectionInternal) {
|
||||
super(connectionInternal);
|
||||
}
|
||||
|
||||
|
@ -1319,7 +1318,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
|||
try {
|
||||
socketChannel.close();
|
||||
} catch (IOException e) {
|
||||
|
||||
LOGGER.log(Level.FINE, "Closing the socket channel failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,8 +169,10 @@ public class RemoteXmppTcpConnectionEndpoints {
|
|||
*
|
||||
* @param domain the domain.
|
||||
* @param domainType the XMPP domain type, server or client.
|
||||
* @param failedAddresses a list that will be populated with host addresses that failed to resolve.
|
||||
* @return a list of resolver host addresses for this domain.
|
||||
* @param lookupFailures a list that will be populated with all failures that oocured during lookup.
|
||||
* @param dnssecMode the DNSSEC mode.
|
||||
* @param dnsResolver the DNS resolver to use.
|
||||
* @return a list of resolved host addresses for this domain.
|
||||
*/
|
||||
private static List<Rfc6120TcpRemoteConnectionEndpoint> resolveDomain(DnsName domain, DomainType domainType,
|
||||
List<RemoteConnectionEndpointLookupFailure> lookupFailures, DnssecMode dnssecMode, DNSResolver dnsResolver) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2020 Florian Schmaus.
|
||||
* Copyright 2020-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.
|
||||
|
@ -24,7 +24,7 @@ import org.minidns.record.SRV;
|
|||
public final class SrvXmppRemoteConnectionEndpoint extends SrvRemoteConnectionEndpoint
|
||||
implements Rfc6120TcpRemoteConnectionEndpoint {
|
||||
|
||||
protected SrvXmppRemoteConnectionEndpoint(SRV srv, List<? extends InetAddress> inetAddresses) {
|
||||
SrvXmppRemoteConnectionEndpoint(SRV srv, List<? extends InetAddress> inetAddresses) {
|
||||
super(srv, inetAddresses);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2020 Florian Schmaus.
|
||||
* Copyright 2020-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.
|
||||
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
|
||||
import org.minidns.record.SRV;
|
||||
|
||||
public class SrvXmppsRemoteConnectionEndpoint extends SrvRemoteConnectionEndpoint {
|
||||
public final class SrvXmppsRemoteConnectionEndpoint extends SrvRemoteConnectionEndpoint {
|
||||
|
||||
protected SrvXmppsRemoteConnectionEndpoint(SRV srv, List<? extends InetAddress> inetAddresses) {
|
||||
SrvXmppsRemoteConnectionEndpoint(SRV srv, List<? extends InetAddress> inetAddresses) {
|
||||
super(srv, inetAddresses);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue