Commit Graph

16 Commits

Author SHA1 Message Date
Florian Schmaus 3d4e7938a7 Make ExtensionElement marker interface wrt. QNAME field
ExtensionElement is now a marker interface that requires all
implementation non-abstract classes to carry a static final QNAME
field (of type QName). This is verified by a new unit test.

Also FullyQualifiedElement is renamed to simply XmlElement. XmlElement
is used over ExtensionElement when implementing classes do not
statically know the qualified name of the XML elements they
represent. In general, XmlElement should be used sparingly, and every
XML element should be modeled by its own Java class (implementing
ExtensionElement).
2021-04-18 21:07:19 +02:00
Florian Schmaus 1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus fee3ed81ca Introduce XmlEnvironment 2019-02-05 13:18:03 +01:00
asokolov 2900c5ae23 Move xml-not-well-formed (RFC 3920) condition handling to StreamError
Fixes SMACK-842.
2018-11-14 14:53:04 +01:00
Florian Schmaus 5ab2903c32 Change Element.toXml() to toXml(String enclosingNamespace) 2018-04-27 10:05:25 +02:00
Paul Schaub cb18056613 Fix minor codestyle issues 2017-12-17 11:03:46 +01:00
Florian Schmaus 710948c8f7 Add support for XEP-360: Nonzas
SMACK-682
2015-07-14 22:43:58 +02:00
Florian Schmaus dc373f641c Make Smack Java8's javac and javadoc ready 2015-04-04 17:16:27 +02:00
Florian Schmaus 64d134052d Enable javadoc checkstyle
and fix violations.
2015-03-29 12:29:32 +02:00
Florian Schmaus d4a6d8e653 Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
lucastucchi 9b9a08bb4b Fix typo in StreamError: s/host_unkown/host_unknown/ 2015-01-16 20:55:42 +01:00
Florian Schmaus 313e537394 Fix 'condtions' typo in StreamError 2015-01-16 20:55:42 +01:00
Jae Jang d5c7a2cad3 Switch right bracket to left bracket on condition start tag.
StreamError toXML should output <..><cond>..</cond>,
not <..>>cond>..</cond>.
2014-12-10 23:15:14 +01:00
Florian Schmaus 7640414e8d Set conditionText to null if it's the empty string
This fixes e.g. IllegalArgumentException "'conflict' can not contain a
condition text", when receiving elements like

<stream:error>
  <conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'></conflict>
  <text xml:lang='' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
    Replaced by new connection
  </text>
</sream:error>

(ejabberd does this)
2014-12-10 12:36:35 +01:00
Florian Schmaus 9286a1decb Rework XMPP Error class design
Introduce AbstractError, change 'Conditions' to enums. Because of
AbstractError, it was necessary that PlainStreamElement and
TopLevelStreamElement becomes an interface. Thus the implementation of
TopLevelStreamElement.toString() had to be removed.

This adds

- policy-violation
- unexpected-request

to XMPPError.Condition, and removes the

- payment-required
- remote-server-error
- unexpected-condition
- request-timeout

Conditions

The file transfer code does now no longer throw XMPPErrorExceptions, but
SmackExceptions.

Fixes SMACK-608. Makes it possible to resolves SMACK-386.
2014-11-25 13:19:32 +01: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 core/src/main/java/org/jivesoftware/smack/packet/StreamError.java (Browse further)