Commit Graph

110 Commits

Author SHA1 Message Date
Florian Schmaus eb4c2c5572 s/occured/occurred/ 2019-10-30 12:02:36 +01:00
Florian Schmaus 69767e9538 Rename AbstractIqBuilder subclasses to their designated names 2019-10-29 19:34:18 +01:00
Florian Schmaus 6e32305987 Apply builder pattern to DiscoverInfo
This is the first transformation of an IQ type to the builder type.
2019-10-29 11:14:55 +01:00
Florian Schmaus 5db6191110 Introduce StanzaBuilder
As first step to immutable Stanza types.
2019-10-25 21:41:55 +02:00
Florian Schmaus eeb6c52f7e Move SASL logic into AbstractXMPPConnection
Besides the way the transport handles the stream after SASL
<success/>, the SASL logic is independend from the underlying
transport (BOSH, TCP, …). Hence move it up into
AbstractXMPPConnection.

This also has the benefit that we can make some more methods private
or package-private.

Also introduce XmlStringBuilder.optTextChild(), which causes some
associated changes.
2019-09-25 13:49:21 +02:00
Florian Schmaus f2e1d7ddd5 Add XmlEnvironment conscious ParserUtils.getXmlLang()
and unify parsing of common stanza attributes where this new method is
used.
2019-09-12 15:15:57 +02:00
Florian Schmaus 86c28e9d13 Use XmlEnvironment.EMPTY instead of null in PacketParserUtils 2019-09-12 15:15:57 +02:00
Florian Schmaus 1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus 4ca2c7cc69 Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks 2019-07-24 09:18:39 +02:00
Florian Schmaus 7d59df9eed Change type of presence priority to 'Byte' 2019-06-11 12:47:39 +02:00
adiaholic f91044657f Generic Exception replaced with Type Specific Exceptions.
'parseAndProcessStanza()' throws generic Exceptions.
Since there are plenty of exceptions that should not be
catched by smack, it's better to throw Type Specific Exceptions.
This Commit is was in response to SMACK-839.
2019-05-19 17:09:01 +05:30
Florian Schmaus d2f5efcb20 Use StandardCharsets.(UTF_8|US_ASCII)
This also gets rid of a ton of UnsupportedEncodingException s.
2019-05-08 12:44:48 +02:00
Florian Schmaus 7f0dc72dab Update errorprone(-plugin) and make Unused(Variable|Method) an error 2019-05-07 23:09:00 +02:00
Florian Schmaus 68d7d738b6 Remove all tabs and add checkstyle rule that enforces no-tabs
Fixes SMACK-866.
2019-05-07 21:24:00 +02:00
Florian Schmaus 4133eb175c Replace XPP3 by XmlPullParser interface wrapping StAX and XPP3
Introducing Smack's own XmlPullParser interface which tries to stay as
compatible as possible to XPP3. The interface is used to either wrap
StAX's XMLStreamReader if Smack is used on Java SE, and XPP3's
XmlPullParser if Smack is used on on Android.

Fixes SMACK-591.

Also introduce JUnit 5 and non-strict javadoc projects.
2019-05-06 22:10:50 +02:00
Florian Schmaus 8df69bd3ce Use XmlEnvironment in parsing/provider subsystem 2019-02-15 23:21:30 +01:00
Florian Schmaus 7dee3b88a2 Introduce SmackParsingException 2019-02-10 19:01:47 +01:00
Florian Schmaus 083dac8b83 Rework exceptions in the parsing / provider subsystem 2019-02-05 13:18:03 +01:00
Florian Schmaus e98d42790a SmackReactor/NIO, Java8/Android19, Pretty print XML, FSM connections
This commit adds
- SmackReactor / NIO
- a framework for finite state machine connections
- support for Java 8
- pretty printed XML debug output

It also
- reworks the integration test framework
- raises the minimum Android API level to 19
- introduces XmppNioTcpConnection

Furthermore fixes SMACK-801 (at least partly). Java 8 language
features are available, but not all runtime library methods. For that
we would need to raise the Android API level to 24 or higher.
2019-02-05 13:18:03 +01:00
Florian Schmaus 23bb5c5625 Add XMPPErrorException.getStanzaError()
Also deprecate getXMPPError and let StanzaError implement
ExtensionElement.
2018-06-20 22:17:11 +02:00
Florian Schmaus e8923b9d16 Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
2018-05-09 23:26:39 +02:00
Florian Schmaus 96f75a1857 Fix TODO in PacketParserUtils 2018-05-09 17:13:09 +02:00
Florian Schmaus 0df7734efc Slightly improve PacketParserUtils.parseSessionFeature() 2018-05-09 17:13:09 +02:00
Florian Schmaus 49417d2e20 Remove deprecated methods in PacketParserUtils 2018-05-09 17:13:09 +02:00
Florian Schmaus 6d76e8a1ae Remove PacketParserutils.getLanguageAttribute(XmlPullParser) 2018-05-09 17:13:09 +02:00
Florian Schmaus a9e45475ab Treat <body/> just like all other extension elements in Message
This turned out to be a rather large change.
2018-05-09 17:13:09 +02:00
Florian Schmaus cd5daa6fd7 Do net set a default language when parsing Message stanzas
the fallback is (usually) not needed, as most XMPP XML streams have a default
xml:lang set (See RFC 6120 § 4.7.4.).
2018-05-09 17:13:09 +02:00
Florian Schmaus ad932caf78 Do not use a reflection based initializer for core elements
like Message.Body from smack-core.
2018-05-09 16:45:14 +02:00
Florian Schmaus 2efec89050 Rename XMPPError to StanzaError
Fixes SMACK-769.
2018-04-07 22:59:25 +02:00
Florian Schmaus ad87243060 Globally 's;stanza(/packet);stanza;' 2018-03-31 14:17:30 +02:00
Paul Schaub 52398b535f
Fix javadoc issues in some packages 2017-12-23 20:21:19 +01:00
Paul Schaub cb18056613 Fix minor codestyle issues 2017-12-17 11:03:46 +01:00
Ingo Bauersachs 699145ee5f Get descriptive text from error without lang
A stanza with <error><text>Some text</text></error>, i.e. without a
xml:lang attribute, did not return the value 'Some text' in
getDescriptiveText().

Insert the empty string as key when the attribute is not present while
parsing the xml. When writing, omit the attribute if the key is the
empty string.
2017-09-27 00:21:40 +02:00
Florian Schmaus 1448fa4632 Add ParserUtils.getXmlLang(XmlPullParser)
and add TODO comment to PacketParserUtils.getLanguageAttribute().
2017-06-17 11:42:09 +02:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus ce1cddc722 More checkstyle whitespace related checks 2017-05-24 14:42:38 +02:00
Florian Schmaus 51378aebee Revert "Throw exception if stanza child contains text"
This reverts commit eb9242768c.

Turns out, that there is in fact not such restriction in the
RFCs (only for <subject/>, <body/> and the a few others).
2017-01-24 22:47:16 +01:00
Florian Schmaus 9328182912 Rework Bits of Binary implementation 2017-01-03 11:05:46 +01:00
Florian Schmaus 9165e818d9 Add ParenPad and NoWhitespaceAfter checkstyle rules 2016-11-29 12:01:41 +01:00
Florian Schmaus eb9242768c Throw exception if stanza child contains text 2016-11-15 22:41:24 +01:00
Florian Schmaus 23201d5f0f Improve logging of failed presence extensions
Don't log the exception for now because the stack trace makes to much
noise in the log output. This is mostly caused by Googles outdated
Entity Capabilities implementation.
2016-01-18 22:08:23 +01:00
Florian Schmaus e6a9027cc6 Improve StringUtils.escapeForXml() 2016-01-18 22:04:20 +01:00
Florian Schmaus 45feaecdf7 Make XMPPError imutable and add stanza reference 2015-12-09 10:48:52 +01:00
Florian Schmaus 227ef2c5ae Add StandardExtensionElement
replaces DefaultExtensionElement which is now deprecated.

Also changes Stanza (and MultiMap) API so that there can be duplicate extension
elements, as this change is required for StandardExtensionElement and by
the XMPP standard.
2015-10-19 08:21:42 +02:00
Florian Schmaus 04a0004035 Smack 4.1.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJV9nAlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41sFEIAJlfRspk6S5ymNc4w7u/FT1w
 MpHT/cxqIQIBU9J5dYqeW6Y8O6VuUeknCmZBEv7dIVHroTmvfosMauAyRZJXWeeL
 FQQTBqDJszYdM88x/d5X6d25lCEBdQkdDh2a5s9AIy9RH0iXE74AypuikbroK+VC
 zI3wRPUFq7WnARtmiP2NalSgSNv5ToeicBO+JSniQ+O52ZAlP2FSDfi4uzPPigdP
 Ip/V3eF4Bp0YZimcxAnWdnMU+ciVLClRYKgD3+qTEoic7dx3dzeTyrk1NoLRgQl9
 mfcNXBgUScHZAoSIkR0QiUx9ktPCJ950qa+XtW3B8NtDOZkXegUL/a8ukQAuz+k=
 =qMsC
 -----END PGP SIGNATURE-----

Merge tag '4.1.4'

Smack 4.1.4
2015-09-14 09:05:24 +02:00
Florian Schmaus b1e4884fbb Remove erroneous next() from AbstractJsonExtensionProvider
Fixes SMACK-695.
2015-08-24 11:09:59 +02:00
Florian Schmaus 1c716bc1e0 Smack 4.1.3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJVpgWiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41G1gH+gIw/seXSSY6vYlVkYEFtR+e
 LV/LArN/eN1ZGc+WjN0EysRyqOBqF8HVHuyO7fF67huDRn62s7hufVY//NTctJ5L
 m4TXwaEUvgjdul7vm/dZcNRYr0jcSpDTFWx2egkOXt3qE9AhnpbnaIJ5c3q9VVVD
 aba88c3NS7quxp0hQm1SNEAmt1CCMPom7YkxdIPKWlLj8N5AF1UuSKwckLLYSUlS
 wloBbITb6EjI1IwszhN6e6o3W+7Pz/1zbFjk0CkKUS+TmhHhKil8TonH8Se/9DYD
 1SVHxvZa8LHWsU9G/R1Nhl69K2+GHEUbGmXalFmyPIf5ifhYyNimpx9krXQUuLs=
 =3/cn
 -----END PGP SIGNATURE-----

Merge tag '4.1.3'

Smack 4.1.3
2015-07-15 09:37:46 +02:00
Florian Schmaus e6a403fb1c Re-escape XML text in parseContentDepth()
SMACK-680.
2015-07-02 16:10:50 +02:00
Florian Schmaus bbc7aaae77 Smack 4.1.1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJVTgmuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41MXUH/3A5Jc6rzALhnXMT4yj+jXow
 rLLX5/ypOvkAXEMRlTf9xd2apz4hT8dMsBcL3JvZscuVmkw0/woh9eV/PFSDoc7t
 HA7bMZRqWqUuVOezFD0ggHsJ7zfpcIuxsgoNARQlCRMPHzCLzKhMNctz5UApAdfy
 +wPpTMpc3K5SM1bNlM60qp+dbPCqQcLwYP02KrOQASgenVDm6iKFpzx0ieVpPY1M
 hOBMyaZg3n2j+267gpqBG6c7PVmEq3deAlB6BOBAsL/Bp1w5B5Smq959LWJLstrU
 /LeYJFi1TeIASiFy1vZyTV0Tw+Pe++3gB6ppLqkQhfWV8vXzm0coCXx29qWxAzM=
 =pGJt
 -----END PGP SIGNATURE-----

Merge tag '4.1.1'

Smack 4.1.1

Conflicts:
	smack-extensions/src/main/java/org/jivesoftware/smackx/caps/provider/CapsExtensionProvider.java
	smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java
	smack-java7/src/main/java/org/jivesoftware/smack/java7/Java7SmackInitializer.java
	version.gradle
2015-05-09 15:42:09 +02:00
Florian Schmaus 236dfb009d Improve logging of parsing errors 2015-05-07 22:40:38 +02:00