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:
parent
38c6dd21b4
commit
c85bcadd81
140 changed files with 270 additions and 265 deletions
|
@ -28,7 +28,7 @@ dependencies {
|
|||
|
||||
testFixturesApi "org.jxmpp:jxmpp-jid:$jxmppVersion:tests"
|
||||
testFixturesApi "org.xmlunit:xmlunit-core:$xmlUnitVersion"
|
||||
// Explictily add assertj-core which is a dependency of
|
||||
// Explicitly add assertj-core which is a dependency of
|
||||
// xmlunit-assertj, but gradle fails to resolves it with:
|
||||
// Execution failed for task ':smack-core:compileTestJava'.
|
||||
// > Could not resolve all files for configuration ':smack-core:testCompileClasspath'.
|
||||
|
|
|
@ -60,7 +60,7 @@ public class MessageTest extends SmackTestCase {
|
|||
}
|
||||
|
||||
Message message = (Message) collector.nextResult(2500);
|
||||
assertNotNull("Message not recieved from remote user", message);
|
||||
assertNotNull("Message not received from remote user", message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -487,7 +487,7 @@ public abstract class SmackTestCase extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the configuration file related to <b>this</b> test case. By default all
|
||||
* Returns the name of the configuration file related to <b>this</b> test case. By default,all
|
||||
* the test cases will use the same configuration file. However, it's possible to override the
|
||||
* default configuration by providing a file of the form <test case class name>.xml
|
||||
* (e.g. RosterTest.xml).
|
||||
|
|
|
@ -128,7 +128,7 @@ import org.jxmpp.stringprep.XmppStringprepException;
|
|||
import org.jxmpp.util.XmppStringUtils;
|
||||
|
||||
/**
|
||||
* This abstract class is commonly used as super class for XMPP connection mechanisms like TCP and BOSH. Hence it
|
||||
* This abstract class is commonly used as super class for XMPP connection mechanisms like TCP and BOSH. Hence, it
|
||||
* provides the methods for connection state management, like {@link #connect()}, {@link #login()} and
|
||||
* {@link #disconnect()} (which are deliberately not provided by the {@link XMPPConnection} interface).
|
||||
* <p>
|
||||
|
|
|
@ -53,14 +53,14 @@ import java.util.concurrent.Executor;
|
|||
public class AsyncButOrdered<K> {
|
||||
|
||||
/**
|
||||
* A map with the currently pending runnables for a given key. Note that this is a weak hash map so we do not have
|
||||
* to take care of removing the keys ourselfs from the map.
|
||||
* A map with the currently pending runnables for a given key. Note that this is a weak hash map, so we do not have
|
||||
* to take care of removing the keys ourselves from the map.
|
||||
*/
|
||||
private final Map<K, Queue<Runnable>> pendingRunnables = new WeakHashMap<>();
|
||||
|
||||
/**
|
||||
* A marker map if there is an active thread for the given key. Holds the responsible handler thread if one is
|
||||
* active, otherwise the key is non-existend in the map.
|
||||
* active, otherwise the key is non-existent in the map.
|
||||
*/
|
||||
private final Map<K, Handler> threadActiveMap = new HashMap<>();
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ import org.minidns.util.InetAddressUtil;
|
|||
/**
|
||||
* The connection configuration used for XMPP client-to-server connections. A well configured XMPP service will
|
||||
* typically only require you to provide two parameters: The XMPP address, also known as the JID, of the user and the
|
||||
* password. All other configuration parameters could ideally be determined automatically by Smack. Hence it is often
|
||||
* password. All other configuration parameters could ideally be determined automatically by Smack. Hence, it is often
|
||||
* enough to call {@link Builder#setXmppAddressAndPassword(CharSequence, String)}.
|
||||
* <p>
|
||||
* Technically there are typically at least two parameters required: Some kind of credentials for authentication. And
|
||||
|
@ -248,7 +248,7 @@ public abstract class ConnectionConfiguration {
|
|||
|
||||
stanzaIdSourceFactory = builder.stanzaIdSourceFactory;
|
||||
|
||||
// If the enabledSaslmechanisms are set, then they must not be empty
|
||||
// If the enabledSaslMechanisms are set, then they must not be empty
|
||||
assert enabledSaslMechanisms == null || !enabledSaslMechanisms.isEmpty();
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ public abstract class ConnectionConfiguration {
|
|||
context = SSLContext.getInstance("TLS");
|
||||
}
|
||||
|
||||
// TODO: Remove the block below once we removed setKeystorePath(), setKeystoreType(), setCallbackHanlder() and
|
||||
// TODO: Remove the block below once we removed setKeystorePath(), setKeystoreType(), setCallbackHandler() and
|
||||
// setPKCS11Library() in the builder, and all related fields and the parameters of this function.
|
||||
if (keyManagers == null) {
|
||||
keyManagers = Builder.getKeyManagersFrom(keystoreType, keystorePath, callbackHandler, pkcs11Library);
|
||||
|
@ -583,7 +583,7 @@ public abstract class ConnectionConfiguration {
|
|||
* Returns true if the connection is going to use stream compression. Stream compression
|
||||
* will be requested after TLS was established (if TLS was enabled) and only if the server
|
||||
* offered stream compression. With stream compression network traffic can be reduced
|
||||
* up to 90%. By default compression is disabled.
|
||||
* up to 90%. By default,compression is disabled.
|
||||
*
|
||||
* @return true if the connection is going to use stream compression.
|
||||
*/
|
||||
|
@ -592,7 +592,7 @@ public abstract class ConnectionConfiguration {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the given SASL mechansism is enabled in this connection configuration.
|
||||
* Check if the given SASL mechanism is enabled in this connection configuration.
|
||||
*
|
||||
* @param saslMechanism TODO javadoc me please
|
||||
* @return true if the given SASL mechanism is enabled, false otherwise.
|
||||
|
@ -607,7 +607,7 @@ public abstract class ConnectionConfiguration {
|
|||
|
||||
/**
|
||||
* Return the explicitly enabled SASL mechanisms. May return <code>null</code> if no SASL mechanisms where
|
||||
* explicitly enabled, i.e. all SALS mechanisms supported and announced by the service will be considered.
|
||||
* explicitly enabled, i.e. all SASL mechanisms supported and announced by the service will be considered.
|
||||
*
|
||||
* @return the enabled SASL mechanisms or <code>null</code>.
|
||||
*/
|
||||
|
@ -1090,8 +1090,7 @@ public abstract class ConnectionConfiguration {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets if an initial available presence will be sent to the server. By default
|
||||
* an available presence will be sent to the server indicating that this presence
|
||||
* Sets if an initial available presence will be sent to the server. By default, * an available presence will be sent to the server indicating that this presence
|
||||
* is not online and available to receive messages. If you want to log in without
|
||||
* being 'noticed' then pass a <code>false</code> value.
|
||||
*
|
||||
|
@ -1266,7 +1265,7 @@ public abstract class ConnectionConfiguration {
|
|||
* Sets if the connection is going to use compression (default false).
|
||||
*
|
||||
* Compression is only activated if the server offers compression. With compression network
|
||||
* traffic can be reduced up to 90%. By default compression is disabled.
|
||||
* traffic can be reduced up to 90%. By default,compression is disabled.
|
||||
*
|
||||
* @param compressionEnabled if the connection is going to use compression on the HTTP level.
|
||||
* @return a reference to this object.
|
||||
|
@ -1324,7 +1323,7 @@ public abstract class ConnectionConfiguration {
|
|||
} else {
|
||||
InputStream stream = TLSUtils.getDefaultTruststoreStreamIfPossible();
|
||||
try {
|
||||
// Note that PKCS12 keystores need a password one some Java platforms. Hence we try the famous
|
||||
// Note that PKCS12 keystores need a password one some Java platforms. Hence, we try the famous
|
||||
// 'changeit' here. See https://bugs.openjdk.java.net/browse/JDK-8194702
|
||||
char[] password = "changeit".toCharArray();
|
||||
try {
|
||||
|
|
|
@ -53,7 +53,7 @@ import org.jxmpp.jid.EntityBareJid;
|
|||
*
|
||||
* <p>Once TLS has been negotiated (i.e. the connection has been secured) it is possible to
|
||||
* register with the server or authenticate using SASL. If the
|
||||
* server supports SASL then Smack will try to authenticate using SASL..</p>
|
||||
* server supports SASL then Smack will try to authenticate using SASL.</p>
|
||||
*
|
||||
* <p>The server may support many SASL mechanisms to use for authenticating. Out of the box
|
||||
* Smack provides several SASL mechanisms, but it is possible to register new SASL Mechanisms. Use
|
||||
|
|
|
@ -30,7 +30,7 @@ public class Smack {
|
|||
public static final String SMACK_PACKAGE = SMACK_ORG + ".smack";
|
||||
|
||||
/**
|
||||
* Returns the Smack version information, eg "1.3.0".
|
||||
* Returns the Smack version information, e.g."1.3.0".
|
||||
*
|
||||
* @return the Smack version information.
|
||||
*/
|
||||
|
|
|
@ -102,7 +102,7 @@ public final class SmackConfiguration {
|
|||
private static HostnameVerifier defaultHostnameVerififer;
|
||||
|
||||
/**
|
||||
* Returns the Smack version information, eg "1.3.0".
|
||||
* Returns the Smack version information, e.g."1.3.0".
|
||||
*
|
||||
* @return the Smack version information.
|
||||
* @deprecated use {@link Smack#getVersion()} instead.
|
||||
|
|
|
@ -96,7 +96,7 @@ import org.jxmpp.jid.EntityFullJid;
|
|||
* <li>other - e.g., {@link #addStanzaListener(StanzaListener, StanzaFilter)}</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* Asynchronous callbacks are run decoupled from the connections main event loop. Hence a callback triggered by
|
||||
* Asynchronous callbacks are run decoupled from the connections main event loop. Hence, a callback triggered by
|
||||
* stanza B may (appear to) invoked before a callback triggered by stanza A, even though stanza A arrived before B.
|
||||
* </p>
|
||||
* <p>
|
||||
|
@ -242,7 +242,7 @@ public interface XMPPConnection {
|
|||
* </p>
|
||||
*
|
||||
* @param stanza the stanza to send.
|
||||
* @return {@code true} if the stanza was successfully scheduled to be send, {@code false} otherwise.
|
||||
* @return {@code true} if the stanza was successfully scheduled to be sent, {@code false} otherwise.
|
||||
* @throws NotConnectedException if the connection is not connected.
|
||||
* @since 4.4.0
|
||||
* @deprecated use {@link #sendStanzaNonBlocking(Stanza)} instead.
|
||||
|
@ -265,7 +265,7 @@ public interface XMPPConnection {
|
|||
* @param stanza the stanza to send.
|
||||
* @param timeout how long to wait before giving up, in units of {@code unit}.
|
||||
* @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter.
|
||||
* @return {@code true} if the stanza was successfully scheduled to be send, {@code false} otherwise.
|
||||
* @return {@code true} if the stanza was successfully scheduled to be sent, {@code false} otherwise.
|
||||
* @throws NotConnectedException if the connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.4.0
|
||||
|
|
|
@ -57,8 +57,8 @@ public interface XmppInputOutputFilter {
|
|||
}
|
||||
|
||||
/**
|
||||
* The returned {@link ByteBuffer} is going to get fliped by the caller. The callee must not flip the buffer.
|
||||
* @param inputData the data this methods needs to process.
|
||||
* The returned {@link ByteBuffer} is going to get flipped by the caller. The callee must not flip the buffer.
|
||||
* @param inputData the data this method needs to process.
|
||||
* @return a {@link ByteBuffer} or {@code null} if no data could be produced.
|
||||
* @throws IOException in case an I/O exception occurs.
|
||||
*/
|
||||
|
|
|
@ -390,7 +390,7 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
|
|||
|
||||
// Ignore successorStateVertex if the only way to the final state is via the initial state. This happens
|
||||
// typically if we are in the ConnectedButUnauthenticated state on the way to ResourceboundAndAuthenticated,
|
||||
// where we do not want to walk via InstantShutdown/Shtudown in a cycle over the initial state towards this
|
||||
// where we do not want to walk via InstantShutdown/Shutdown in a cycle over the initial state towards this
|
||||
// state.
|
||||
if (walkStateGraphContext.wouldCauseCycle(successorStateVertex)) {
|
||||
// Ignore this successor.
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smack.datatypes;
|
|||
import org.jivesoftware.smack.util.NumberUtil;
|
||||
|
||||
/**
|
||||
* A number representing an unsigned 16-bit integer. Can be used for values with the XML schema type "xs:unsingedShort".
|
||||
* A number representing an unsigned 16-bit integer. Can be used for values with the XML schema type "xs:unsignedShort".
|
||||
*/
|
||||
public final class UInt16 extends Scalar implements Comparable<UInt16> {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.jivesoftware.smack.util.ExceptionUtil;
|
|||
* even block the thread since only one thread may print at a time.
|
||||
* <p>
|
||||
* It is possible to not only print the raw sent and received stanzas but also the interpreted
|
||||
* packets by Smack. By default interpreted packets won't be printed. To enable this feature
|
||||
* packets by Smack. By default,interpreted packets won't be printed. To enable this feature
|
||||
* just change the <code>printInterpreted</code> static variable to <code>true</code>.
|
||||
* </p>
|
||||
*
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jivesoftware.smack.XMPPConnection;
|
|||
* even block the thread since only one thread may print at a time.
|
||||
* <p>
|
||||
* It is possible to not only print the raw sent and received stanzas but also the interpreted
|
||||
* packets by Smack. By default interpreted packets won't be printed. To enable this feature
|
||||
* packets by Smack. By default,interpreted packets won't be printed. To enable this feature
|
||||
* just change the <code>printInterpreted</code> static variable to <code>true</code>.
|
||||
* </p>
|
||||
*
|
||||
|
|
|
@ -57,7 +57,7 @@ public abstract class SmackDebugger {
|
|||
*
|
||||
* @param user the user@host/resource that has just logged in
|
||||
*/
|
||||
// TODO: Should be replaced with a connection listener authenticed().
|
||||
// TODO: Should be replaced with a connection listener authenticated().
|
||||
public abstract void userHasLogged(EntityFullJid user);
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* <li>{@link StanzaIdFilter}: filters for stanzas with a particular stanza ID</li>
|
||||
* <li>{@link ToMatchesFilter}: filters for stanzas that are sent to a particular address</li>
|
||||
* <li>{@link FromMatchesFilter}: filters for stanzas that are sent from a particular address</li>
|
||||
* <li>{@link ExtensionElementFilter}: filters for stanzas that have a particular stanza exentsion element</li>
|
||||
* <li>{@link ExtensionElementFilter}: filters for stanzas that have a particular stanza extension element</li>
|
||||
* <li>{@link AndFilter}: implements the logical AND operation over two or more filters</li>
|
||||
* <li>{@link OrFilter}: implements the logical OR operation over two or more filters</li>
|
||||
* <li>{@link NotFilter}: implements the logical NOT operation on a filter</li>
|
||||
|
|
|
@ -118,7 +118,7 @@ public abstract class StateDescriptor {
|
|||
if (stateClassConstructor != null) {
|
||||
stateClassConstructor.setAccessible(true);
|
||||
} else {
|
||||
// TODO: Add validation check that if stateClassConstructor is 'null' the cosntructState() method is overriden.
|
||||
// TODO: Add validation check that if stateClassConstructor is 'null' the constructState() method is overridden.
|
||||
}
|
||||
|
||||
String className = getClass().getSimpleName();
|
||||
|
@ -155,7 +155,7 @@ public abstract class StateDescriptor {
|
|||
clazz = Class.forName(clazzName);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// The state descriptor class is not in classpath, which probably means that the smack module is not loaded
|
||||
// into the classpath. Hence we can silently ignore that.
|
||||
// into the classpath. Hence, we can silently ignore that.
|
||||
LOGGER.log(Level.FINEST, "Ignoring unknown state descriptor '" + clazzName + "'", e);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ public class StateDescriptorGraph {
|
|||
inferredForwardEdges.put(predecessor, backwardsEdge);
|
||||
}
|
||||
}
|
||||
// Ensure that the intial node has their successors inferred.
|
||||
// Ensure that the initial node has their successors inferred.
|
||||
for (Class<? extends StateDescriptor> inferredSuccessorOfInitialStateDescriptor : inferredForwardEdges.getAll(initialStatedescriptorClass)) {
|
||||
initialNode.getElement().addSuccessor(inferredSuccessorOfInitialStateDescriptor);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smack.packet;
|
|||
/**
|
||||
* Interface to represent XMPP extension elements. Unlike {@link XmlElement}, every non-abstract class that implements
|
||||
* {@link ExtensionElement} must have a static final QNAME member of the type {@link javax.xml.namespace.QName}. This
|
||||
* allows type-safe functions like {@link StanzaView#getExtension(Class)}. Hence this is a marker interface.
|
||||
* allows type-safe functions like {@link StanzaView#getExtension(Class)}. Hence, this is a marker interface.
|
||||
* <p>
|
||||
* Use this class when implementing new extension elements when possible. This means that every instance of your
|
||||
* implemented class must represent an XML element of the same qualified name.
|
||||
|
|
|
@ -95,7 +95,7 @@ public abstract class IQ extends Stanza implements IqView {
|
|||
/**
|
||||
* Sets the type of the IQ packet.
|
||||
* <p>
|
||||
* Since the type of an IQ must present, an IllegalArgmentException will be thrown when type is
|
||||
* Since the type of an IQ must present, an IllegalArgumentException will be thrown when type is
|
||||
* <code>null</code>.
|
||||
* </p>
|
||||
*
|
||||
|
@ -182,7 +182,7 @@ public abstract class IQ extends Stanza implements IqView {
|
|||
// Add the query section if there is one.
|
||||
IQChildElementXmlStringBuilder iqChildElement = getIQChildElementBuilder(
|
||||
new IQChildElementXmlStringBuilder(getChildElementName(), getChildElementNamespace(), null, xml.getXmlEnvironment()));
|
||||
// TOOD: Document the cases where iqChildElement is null but childElementName not. And if there are none, change
|
||||
// TODO: Document the cases where iqChildElement is null but childElementName not. And if there are none, change
|
||||
// the logic.
|
||||
if (iqChildElement == null) {
|
||||
return;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
package org.jivesoftware.smack.packet;
|
||||
|
||||
/**
|
||||
* A Nonza, i.e everything that is <b>not a stanza</b> as defined
|
||||
* A Nonza, i.e. everything that is <b>not a stanza</b> as defined
|
||||
* RFC 6120 8. Stanzas are {@link Message}, {@link Presence} and {@link IQ}.
|
||||
* Everything else should sublcass this class instead of {@link Stanza}.
|
||||
* <p>
|
||||
|
|
|
@ -98,7 +98,7 @@ public abstract class Stanza implements StanzaView, TopLevelStreamElement {
|
|||
protected Stanza(StanzaBuilder<?> stanzaBuilder) {
|
||||
if (stanzaBuilder.stanzaIdSource != null) {
|
||||
id = stanzaBuilder.stanzaIdSource.getNewStanzaId();
|
||||
// Note that some stanza ID sources, e.g. StanzaBuilder.PresenceBuilder.EMPTY return null here. Hence we
|
||||
// Note that some stanza ID sources, e.g. StanzaBuilder.PresenceBuilder.EMPTY return null here. Hence, we
|
||||
// only check that the returned string is not empty.
|
||||
assert StringUtils.isNullOrNotEmpty(id);
|
||||
usedStanzaIdSource = stanzaBuilder.stanzaIdSource;
|
||||
|
|
|
@ -87,9 +87,9 @@ public abstract class StanzaBuilder<B extends StanzaBuilder<B>> implements Stanz
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the recipent address of the stanza.
|
||||
* Set the recipient address of the stanza.
|
||||
*
|
||||
* @param to whoe the stanza is being sent to.
|
||||
* @param to whom the stanza is being sent.
|
||||
* @return a reference to this builder.
|
||||
* @throws XmppStringprepException if the provided character sequence is not a valid XMPP address.
|
||||
* @see #to(Jid)
|
||||
|
|
|
@ -58,9 +58,9 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
|||
* stream has been authenticated </td></tr>
|
||||
* <tr><td> policy-violation </td><td> the entity has violated some local service
|
||||
* policy. </td></tr>
|
||||
* <tr><td> remote-connection-failed </td><td> Rthe server is unable to properly connect
|
||||
* <tr><td> remote-connection-failed </td><td> the server is unable to properly connect
|
||||
* to a remote entity. </td></tr>
|
||||
* <tr><td> resource-constraint </td><td> Rthe server lacks the system resources necessary
|
||||
* <tr><td> resource-constraint </td><td> the server lacks the system resources necessary
|
||||
* to service the stream. </td></tr>
|
||||
* <tr><td> restricted-xml </td><td> the entity has attempted to send restricted XML
|
||||
* features. </td></tr>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* The Smack provider architecture is a system for plugging in custom XML parsing of staza extensions
|
||||
* The Smack provider architecture is a system for plugging in custom XML parsing of stanza extensions
|
||||
* ({@link org.jivesoftware.smack.packet.ExtensionElement}, {@link org.jivesoftware.smack.packet.IQ} stanzas and
|
||||
* {@link org.jivesoftware.smack.packet.Nonza}. Hence, there are the the following providers:
|
||||
* <ul>
|
||||
|
|
|
@ -358,7 +358,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
* SASLprep the given String. The resulting String is in UTF-8.
|
||||
*
|
||||
* @param string the String to sasl prep.
|
||||
* @return the given String SASL preped
|
||||
* @return the given String SASL prepped
|
||||
* @see <a href="http://tools.ietf.org/html/rfc4013">RFC 4013 - SASLprep: Stringprep Profile for User Names and Passwords</a>
|
||||
*/
|
||||
protected static String saslPrep(String string) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public class MAC {
|
|||
HMAC_SHA1 = Mac.getInstance(HMACSHA1);
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
// Smack wont be able to function normally if this exception is thrown, wrap it into
|
||||
// Smack won't be able to function normally if this exception is thrown, wrap it into
|
||||
// an ISE and make the user aware of the problem.
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class MD5 {
|
|||
MD5_DIGEST = MessageDigest.getInstance(StringUtils.MD5);
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
// Smack wont be able to function normally if this exception is thrown, wrap it into
|
||||
// Smack won't be able to function normally if this exception is thrown, wrap it into
|
||||
// an ISE and make the user aware of the problem.
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ public class PacketParserUtils {
|
|||
// Assume this is the end tag of the start tag at the
|
||||
// beginning of this method. Typical examples where this
|
||||
// happens are body elements containing the empty string,
|
||||
// ie. <body></body>, which appears to be valid XMPP, or a
|
||||
// i.e. <body></body>, which appears to be valid XMPP, or a
|
||||
// least it's not explicitly forbidden by RFC 6121 5.2.3
|
||||
return "";
|
||||
} else {
|
||||
|
@ -850,7 +850,7 @@ public class PacketParserUtils {
|
|||
throws XmlPullParserException, IOException {
|
||||
ParserUtils.assertAtStartTag(parser);
|
||||
assert parser.getNamespace().equals(StartTls.NAMESPACE);
|
||||
int initalDepth = parser.getDepth();
|
||||
int initialDepth = parser.getDepth();
|
||||
boolean required = false;
|
||||
outerloop: while (true) {
|
||||
XmlPullParser.Event event = parser.next();
|
||||
|
@ -864,7 +864,7 @@ public class PacketParserUtils {
|
|||
}
|
||||
break;
|
||||
case END_ELEMENT:
|
||||
if (parser.getDepth() == initalDepth) {
|
||||
if (parser.getDepth() == initialDepth) {
|
||||
break outerloop;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -146,7 +146,7 @@ public class ParserUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Prase a string to a boolean value as per "xs:boolean". Valid input strings are "true", "1" for true, and "false", "0" for false.
|
||||
* Phrase a string to a boolean value as per "xs:boolean". Valid input strings are "true", "1" for true, and "false", "0" for false.
|
||||
*
|
||||
* @param booleanString the input string.
|
||||
* @return the boolean representation of the input string
|
||||
|
|
|
@ -31,7 +31,7 @@ public class SHA1 {
|
|||
SHA1_DIGEST = MessageDigest.getInstance(StringUtils.SHA1);
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
// Smack wont be able to function normally if this exception is thrown, wrap it into
|
||||
// Smack won't be able to function normally if this exception is thrown, wrap it into
|
||||
// an ISE and make the user aware of the problem.
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ public class StringUtils {
|
|||
try {
|
||||
randomString(charBuffer, random, alphabet, numRandomChars);
|
||||
} catch (IOException e) {
|
||||
// This should never happen if we calcuate the buffer size correctly.
|
||||
// This should never happen if we calculate the buffer size correctly.
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
* </p>
|
||||
* <h2>Best Practices</h2>
|
||||
* <p>
|
||||
* We recommend that applications using Smack's DNSSEC API do not ask the user if DNSSEC is avaialble. Instead they
|
||||
* should check for DNSSEC suport on every connection attempt. Once DNSSEC support has been discovered, the application
|
||||
* We recommend that applications using Smack's DNSSEC API do not ask the user if DNSSEC is available. Instead they
|
||||
* should check for DNSSEC support on every connection attempt. Once DNSSEC support has been discovered, the application
|
||||
* should use the `needsDnssec` mode for all future connection attempts. The same scheme can be applied when using DANE.
|
||||
* This approach is similar to the scheme established by to <a href="https://tools.ietf.org/html/rfc6797">HTTP Strict
|
||||
* Transport Security" (HSTS, RFC 6797</a>.
|
||||
|
|
|
@ -39,9 +39,9 @@ import org.jxmpp.stringprep.XmppStringprepException;
|
|||
* A dummy implementation of {@link XMPPConnection}, intended to be used during
|
||||
* unit tests.
|
||||
*
|
||||
* Instances store any packets that are delivered to be send using the
|
||||
* Instances store any packets that are delivered to be sent using the
|
||||
* {@link #sendStanza(Stanza)} method in a blocking queue. The content of this queue
|
||||
* can be inspected using {@link #getSentPacket()}. Typically these queues are
|
||||
* can be inspected using {@link #getSentPacket()}. Typically, these queues are
|
||||
* used to retrieve a message that was generated by the client.
|
||||
*
|
||||
* Packets that should be processed by the client to simulate a received stanza
|
||||
|
|
|
@ -41,7 +41,7 @@ import org.jxmpp.stringprep.XmppStringprepException;
|
|||
* Note that this test is based on the assumption that it is possible to trigger a full garbage collection run, which is
|
||||
* not the case. See also this
|
||||
* <a href="https://stackoverflow.com/questions/1481178/how-to-force-garbage-collection-in-java">stackoverflow
|
||||
* question</a>. Hence the {@link #triggerGarbageCollection()} method defined in this class is not portable and depends
|
||||
* question</a>. Hence, the {@link #triggerGarbageCollection()} method defined in this class is not portable and depends
|
||||
* on implementation depended Java Virtual Machine behavior.
|
||||
* </p>
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue