The idea is that xml-roundtrip should *never* be expected from a
XmlPullParser. So what we need is a method that parses the content of an
element without relying on getText() returning text if on START_TAG or
END_TAG. This is already done by PubSubs ItemProvider.
Also add PacketParserUtils.parseElement() which will return the current
element as String and use this method in PubSub's ItemProvider.
by using XmlStringBuilder. Fixes SMACK-577
Also extend LazyStringBuilder with a cache. And extend XmlStringBuilder
with some more convenience methods.
Move the ELEMENT and NAMESPACE definition from Form to DataForm, where
it belongs.
that method never worked correctly since 11 years, ie. the PrivateData
was never added as element text. It's not surprisingly that this was not
discovered in more then a decade, since Smack usually never *sends*
those stanza but only receives them.
But that's no reason to not fix it. :)
Some parts of the documentation still refer to
Connection connection = new XMPPConnection(…)
when it should be
XMPPConnection connection = new XMPPTCPConnection(…)
SMACK-574
and MultipleRecipient (XEP-33) related code in general (e.g. use
constants where possible).
For getMultipleRecipientServiceAddress() this means that
- the "synchronized (services)" block is removed
- ServiceDiscoveryManager is only retrieved once
The idea that we abstract the scheduling of tasks on Android over this
method turned out to be unnecessary. schedule() was also not really part
of the *public* XMPPConnection API, so it's good that it's gone.
Move some duplicate code from XMPP(TCP|BOSH)Connection to
PacketParserUtils. Remove TestUtils as the method now part of Smack's
public API in PacketParserUtils.
Most importantly, rename reload() method of persistent cache to
"DiscoverInfo lookup(String nodeVer)" and lazily load the data from the
persistent cache to the memory cache.
Smack should not throw an IOException in case a stream got closed by
the remote peer and the user is trying to read() from the stream. This
commit fixes that, by making Smack return '-1' if the stream got
closed by the remote. An IOException will only be thrown if the user
tries to read from a stream that got already closed by *himself*.
SMACK-468
This method was never intended to be part of the public API. It's also
critical that the given Runnables complete within a reasonable
time frame so that they don't block following ones.