1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

Fixes spelling (includes one API change)

Mostly benign changes. Added one new method to replace a method with a spelling mistake in its name. Kept the old method, marked as 'deprecated'.
This commit is contained in:
Guus der Kinderen 2024-09-06 21:52:50 +02:00
parent 38c6dd21b4
commit c85bcadd81
140 changed files with 270 additions and 265 deletions

View file

@ -16,6 +16,6 @@
*/
/**
* XMPPTCPConnection Stream Managment Predicates.
* XMPPTCPConnection Stream Management Predicates.
*/
package org.jivesoftware.smack.sm.predicates.tcp;

View file

@ -187,7 +187,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
private static boolean useSmResumptionDefault = true;
/**
* The stream ID of the stream that is currently resumable, ie. the stream we hold the state
* The stream ID of the stream that is currently resumable, i.e. the stream we hold the state
* for in {@link #clientHandledStanzasCount}, {@link #serverHandledStanzasCount} and
* {@link #unacknowledgedStanzas}.
*/
@ -203,7 +203,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
private Failed smResumptionFailed;
/**
* Represents the state of stream magement.
* Represents the state of stream management.
* <p>
* This boolean is marked volatile as it is read by various threads, including the reader thread via {@link #isSmEnabled()}.
* </p>
@ -1162,8 +1162,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
}
catch (Exception e) {
// Set running to false since this thread will exit here and notifyConnectionError() will wait until
// the reader and writer thread's 'running' value is false. Hence we need to set it to false before calling
// notifyConnetctionError() below, even though run() also sets it to false. Therefore, do not remove this.
// the reader and writer thread's 'running' value is false. Hence, we need to set it to false before calling
// notifyConnectionError() below, even though run() also sets it to false. Therefore, do not remove this.
running = false;
String ignoreReasonThread = null;
@ -1645,8 +1645,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
private void sendSmAcknowledgementInternal() throws NotConnectedException, InterruptedException {
AckAnswer ackAnswer = new AckAnswer(clientHandledStanzasCount);
// Do net put an ack to the queue if it has already been shutdown. Some servers, like ejabberd, like to request
// an ack even after we have send a stream close (and hance the queue was shutdown). If we would not check here,
// then the ack would dangle around in the queue, and be send on the next re-connection attempt even before the
// an ack even after we have sent a stream close (and hence the queue was shutdown). If we would not check here,
// then the ack would dangle around in the queue, and be sent on the next re-connection attempt even before the
// stream open.
packetWriter.queue.putIfNotShutdown(ackAnswer);
}

View file

@ -373,7 +373,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
}
}
// It is ok if outpuFilterInputData is 'null' here, this is expected behavior.
// It is ok if outputFilterInputData is 'null' here, this is expected behavior.
if (outputFilterInputData != null && outputFilterInputData.hasRemaining()) {
filteredOutgoingBuffer = outputFilterInputData;
} else {
@ -474,7 +474,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
// read() may return -1 if the input side of a socket is shut down.
// Note that we do not call notifyConnectionError() here because the connection may be
// cleanly shutdown which would also cause read() to return '-1. I assume that this socket
// will be selected again, on which read() would throw an IOException, which will be catched
// will be selected again, on which read() would throw an IOException, which will be caught
// and invoke notifyConnectionError() (see a few lines above).
/*
IOException exception = new IOException("NIO read() returned " + bytesRead);
@ -633,7 +633,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
@Override
protected void loadConnectionEndpoints(LookupConnectionEndpointsSuccess lookupConnectionEndpointsSuccess) {
// The API contract stats that we will be given the instance we handed out with lookupConnectionEndpoints,
// which must be of type DiscoveredTcpEndpoints here. Hence if we can not cast it, then there is an internal
// which must be of type DiscoveredTcpEndpoints here. Hence, if we can not cast it, then there is an internal
// Smack error.
discoveredTcpEndpoints = (DiscoveredTcpEndpoints) lookupConnectionEndpointsSuccess;
}
@ -711,7 +711,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
// Add OP_WRITE to the interested Ops, since we have now new things to write. Note that this may cause
// multiple reactor threads to race to the channel selected callback in case we perform this right after
// a select() returned with this selection key in the selected-key set. Hence we use tryLock() in the
// a select() returned with this selection key in the selected-key set. Hence, we use tryLock() in the
// channel selected callback to keep the invariant that only exactly one thread is performing the
// callback.
// Note that we need to perform setInterestedOps() *without* holding the channelSelectedCallbackLock, as
@ -776,7 +776,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
// TODO: It appears this should be done in a generic way. I'd assume we always
// have to wait for stream features after the connection was established. If this is true then consider
// moving this into State.AbstractTransport. But I am not yet 100% positive that this is the case for every
// transport. Hence keep it here for now.
// transport. Hence, keep it here for now.
connectionInternal.newStreamOpenWaitForFeaturesSequence("stream features after initial connection");
return new TcpSocketConnectedResult(remoteAddress);
@ -1090,7 +1090,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
// A delegated task is asynchronously running. Take care of the remaining accumulatedData.
addAsPendingInputData(accumulatedData);
// Return here, as the async task created by handleHandshakeStatus will continue calling the
// cannelSelectedCallback.
// channelSelectedCallback.
return null;
case NEED_UNWRAP:
continue;
@ -1114,7 +1114,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
switch (engineResultStatus) {
case OK:
// SSLEngine's unwrap() may not consume all bytes from the source buffer. If this is the case, then
// simply perform another unwrap until accumlatedData has no remaining bytes.
// simply perform another unwrap until accumulatedData has no remaining bytes.
if (accumulatedData.hasRemaining()) {
continue;
}

View file

@ -169,7 +169,7 @@ public class RemoteXmppTcpConnectionEndpoints {
*
* @param domain the domain.
* @param domainType the XMPP domain type, server or client.
* @param lookupFailures a list that will be populated with all failures that oocured during lookup.
* @param lookupFailures a list that will be populated with all failures that occurred during lookup.
* @param dnssecMode the DNSSEC mode.
* @param dnsResolver the DNS resolver to use.
* @return a list of resolved host addresses for this domain.