Rework StringUtils.escapeForXML() so that it can be used also for
StringUtils.xmlAttribEncodeBinary(). escapeForXML() now uses a
switch/case statement, which should leave the (JIT) compiler more room
for optimizations.
Removing the "do not escape unicode character references", because
this behavior, introduced with
8264ebdfb5, is incorrect.
ChatManager's Chat instances are now removed by Chat.close(), removing
the need for a Map with Hard to Weak references.
ChatStateManager can simply use WeakHashMap.
Although this was mandatory on RFC 3921, RFC 6120/6121 don't even mention this part of the protocol.
Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Also remove the Exceptions from the signature of getRoster().
Extend ConnectionListener with connected() and authenticated()
callbacks, required by Roster to be notified so that the Roster can be
loaded *after* login.
SmackException (and it's subclasses) is for all errors/exceptions not
defined by any XMPP specification. XMPPException is now an abstract
class for all errors defined by the XMPP specifications.
Methods that involve an IQ exchange now either return the result, which
is obtained by IQ response, or they throw an XMPPErrorException if an IQ
error was the result of the IQ set/get. If there was no response from
the server within the default packet timeout, a NoResponseException will
be thrown.
XMPP SASL errors are now also reported accordingly.
SMACK-426
Use Type enum instead of String for PrivacyItem's constructor. Add
getName() to PrivacyList. Remove PrivacyRule, as it just adds unnecessary
complexity spliting PrivacyItem and PrivacyRule, they belong
together. Don't mix camel-case and c-style method names. Some minor
improvements. Add parser test.
- There is now no longer the need to use reflection for
compression-jzlib.
- compressionHandlers are a global configuration property and therefore
belong in SmackConfiguration.
RFC4616 states that if the authorization identity (authzid) parameter is
null, then it is derived from the authentication
identity (authcid). Smack currently sets both, authzid and authcid, to
the username, resulting in auth attempts of
userid\0userid\0password
instead of
userid\0password
Which are different users on most systems (e.g. Kerberos).
We now set only SASLMechanism.authenticationId to username. The
authenticate(String, CallbackHandler) method does now not longer receive
the username, as it's send by the CallbackHandler.
The VersionProvider is used to parse Version IQs. Integration:
providerManager.addIQProvider("query", Version.NAMESPACE, new VersionProvider());
The VersionManager is used to reply to Version IQs. Integration:
VersionManger.getInstanceFor(connection).setVersion(
new Version("App Name", "1.23", "Operating System"));
This fixes issue there on android in XHTMLExtension bodys contained "null" instead of actual xhtml tags
This happened due to difference in XPP implementation in KXmlPullParser (on Android) MXParser (in other cases)
This fix replaces usage of getText method of XPP with restoration of xhtml tags using XPP api.
- Fix "packet.Time is not thread-safe" (SMACK-543)
- Update packet.Time to XEP-0202
Add SDM.supportsFeature(), since this is a pattern that repeats over and
over again in Smack. Also add abstract Manager class, that takes care of
the weak reference to Connection, as this is also a repeating pattern in
Smack.
The finalize approach was flawed anyway, it would have never been
called. Because if the packetListener was still referenced from a
connection, and the connection was still strong referenced, then a
strong reference from a gc root would still exists to the manager, which
would prevent it from being gc'ed and finalized being called.