Commit Graph

13 Commits

Author SHA1 Message Date
Florian Schmaus 11cc2d8d77 [core] Align behavior of getParserFor(InputStream) and getParserFor(Reader)
Reported-by: Ingo Bauersachs <ingo@jitsi.org>
2021-11-30 10:49:55 +01:00
adiaholic 5169e887ad Replace JUnit4 with JUnit5 in `smack-extensions`.
This commit concludes migration of `smack-extensions` module,
from JUnit4 to JUnit5.
2020-04-07 15:46:21 +05:30
Florian Schmaus 78be8f3a04 junit: bump to 5.6.0 2020-02-23 19:12:54 +01: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
Paul Schaub cb18056613 Fix minor codestyle issues 2017-12-17 11:03:46 +01: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 0897b76718 Fix unit-tests initialization
Remove the TestSuite class. We now have

SmackTestSuite
    ^
	|
InitExtensions
    ^
	|
$UnitTest

where most basic setup is done in a static block within
SmackTestSuite (only stringencoder setup right now).

Also some minor fixes in unit tests.
2015-03-24 21:40:08 +01:00
Florian Schmaus d4a6d8e653 Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
Florian Schmaus 6980c8e63d Rework Smack Provider design
this is the first stop towards fixing "SMACK-65: parsing should look for
depth", by providing the initial parsing depth to the provider. Some
methods (.e.g parseMessage) now use the depth as abort condition,
instead of a unclean String equals check.

parseIQ() and parseExtension() where both renamed to parse.

This also restricts the Exceptions thrown by the parse method, to just
XmlPullParserException, IOException and SmackException (not really a big
victory, but nevertheless a slight improvement).

StreamFeatureProvider is now gone, we simply use PacketExtensionProvider
for stream features.
2014-10-08 16:01:14 +02:00
Florian Schmaus f671b9e781 Use CharSequence instead of String in parseContent()
and parseContentDepth(). This also means that the type of some fields
changed from String to CharSequence.

Also add Matcher for CharSequences.
2014-07-06 21:10:40 +02:00
Florian Schmaus 54b18e3575 Make XHMTMLExtensionProvider use parseElement()
which makes the whole provider much simpler.

Also use CharSequence as Base for XHTML-IM bodies.
2014-07-05 15:04:35 +02:00
Florian Schmaus 91fd15ad86 Prefix subprojects with 'smack-'
instead of using the old baseName=smack appendix=project.name approach,
we are now going convention over configuration and renaming the
subprojects directories to the proper name.

Having a prefix is actually very helpful, because the resulting
libraries will be named like the subproject. And a core-4.0.0-rc1.jar is
not as explicit about what it actually *is* as a
smack-core-4.0.0-rc1.jar.

SMACK-265
2014-04-28 19:44:14 +02:00
Renamed from extensions/src/test/java/org/jivesoftware/smackx/xhtmlim/provider/XHTMLExtensionProviderTest.java (Browse further)