The jingle subproject builds now. This doesn't change that the code is
outdated with regard to the specification and unmaintained for
years. But hopefully this is the first step to change that. :)
The integration tests have been moved into SourceSets of 'core' and
'extensions'.
Instead of repeating the same pattern, when sending an IQ get/set packet
and collecting the response
PacketFilter filter = new PacketIDFilter(request.getPacketID()),
PacketCollector collector = connection.createPacketCollector(filter);
connection.sendPacket(reg);
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
// Stop queuing results
collector.cancel();
if (result == null) {
throw new XMPPException("No response from server.");
}
else if (result.getType() == IQ.Type.ERROR) {
throw new XMPPException(result.getError());
}
the API got redesigned, so that the above code block can be replaced
with
Packet result = connection.createPacketCollectorAndSend(request).nextResultOrThrow();
Also move ProviderConfigTest into core, since it tests core
functionality, nothing provided by extensions. Found the reason the test
was failing since the gradle migration (provider entry test.providers),
and activated it again. \o/
New API design as of SMACK-545
Change all \r\n into unix style newlines. Add missing newlines at the
end of a file and activate the newline checkstyle module, that enforces
'\n' as newline and a newline at the end of every file.
The initializer tests verify that every non-optional initializer, this
includes Providers, is loadable.
Creating files under META-INF is not considered best practice. Smack's
configuration and provider files reside now in classpath directory
qualified by Smack's package namespace.
The implementation of ServerTrustManger contains a security
vulnerability, which could lead to unauthorized certificates being
erroneously trusted. SMACK-410
If a Manager is strong referenced from a gc root, usually the instances
map, it should not hold itself a strong reference the connection in
order to avoid a cycle that prevents the Connection instance from being
gc'ed.
SMACK-383
no.test wasn't used in that path anyways, so remove it. And
release-exists will always return true since the release.xml Ant script
is part of the repository.
aSmack replaces 'new MXParser()' with
'XmlPullParserFactory.newInstance().newPullParser()' which can throw a
XmlPullParserException. In order to build aSmack, we need to move the
'new MXParser()' within a try/catch block.
Some unit tests depend on SmackConfiguration being loaded, so that the
initializer was run and the providers where configured. We create this
condition now by setting "reloading=false" to the junit task and hope
that there was a unit test before us that loaded SmackConfiguration.
But we keep in mind that this is only a ugly workaround, as unit test
should work on their own and have no inter-dependencies,