Commit Graph

9 Commits

Author SHA1 Message Date
Florian Schmaus f3e007bad5 NPE check in SmackConfiguration 2014-03-09 23:43:34 +01:00
Florian Schmaus 54a421e84e Make JUL Loggers final (SMACK-536) 2014-02-26 22:00:27 +01:00
Florian Schmaus 3093333533 Reworked Smack initialization
Move extension relevant configuration options from SmackConfiguration to
the extension. Introduced disabledSmackClasses that can be configured
via a system property or configuration file.
2014-02-23 17:48:07 +01:00
Florian Schmaus 4121ec2c0e Use String(String,String) constructor in SmackConfiguration
String(String, Charset) is not available on all platforms, as it's only
provided by Android on API level 9 or higher.
2014-02-22 14:41:19 +01:00
Florian Schmaus 24b637876f Substitute MXParser with a call to XmlPullParserFactory
This makes Smack more portable, as there are platforms that support the
XmlPullParser interface, but not MXParser (e.g. Android).

Also enable checkstyle check that MXParser is not used.
2014-02-20 13:48:36 +01:00
Florian Schmaus 7bd7b3d24c Improve packet send and result collecting API
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();
2014-02-18 19:39:47 +01:00
Florian Schmaus 1e57f1c659 Activate checkstyle and add missing license headers
Delete also all "All rights reserved" statements, as they are
unnecessary and conflict with checkstyle's header check. Delete unused
imports.
2014-02-17 20:09:55 +01:00
Florian Schmaus 2ad517b6dd Add initializer tests and move classpath files
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.
2014-02-15 22:12:12 +01:00
Florian Schmaus 201152ef42 Migrate from Ant to Gradle (SMACK-265) 2014-02-14 18:46:33 +01:00
Renamed from source/org/jivesoftware/smack/SmackConfiguration.java (Browse further)