Commit Graph

33 Commits

Author SHA1 Message Date
Florian Schmaus ce1cddc722 More checkstyle whitespace related checks 2017-05-24 14:42:38 +02:00
Florian Schmaus 4c646436a5 Bump "Error Prone" to 2.0.15
and fix a few things :)
2017-02-11 16:16:41 +01:00
Florian Schmaus f633313c4a Add Message.setBody(CharSequence) 2017-01-02 00:47:25 +01:00
Florian Schmaus 5a2326a856 Add convinient constructors for Message and Presence 2016-10-31 12:24:03 +01:00
Florian Schmaus 4d7e4b2ab1 Add Message(String, String) constructor
to make simply Smack examples work, e.g.

Message message = new Message("user@example.org", "Hi, how are you?");
2016-07-24 21:21:21 +02:00
Florian Schmaus 86e11e69e8 Add Message.toString() providing a short description 2016-05-25 22:58:34 +02:00
Florian Schmaus b4694ec152 Add FinalClass checkstyle check
And mark affected classes final.
2015-04-06 10:45:12 +02:00
Florian Schmaus dc373f641c Make Smack Java8's javac and javadoc ready 2015-04-04 17:16:27 +02:00
Florian Schmaus 0fde39fa45 's;^\s+$;;' on all source files
And add checkstyle test for lines containing only whitespace characters.
2015-03-17 11:33:02 +01:00
Florian Schmaus 369878b6d9 Merge branch '4.1'
Conflicts:
	version.gradle
2015-03-11 20:51:08 +01:00
Florian Schmaus e85c1881d7 Add TypedCloneable 2015-03-10 22:50:48 +01:00
Florian Schmaus 701aa7d9c4 Merge branch '4.1'
Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/PacketCollector.java
	smack-core/src/main/java/org/jivesoftware/smack/PacketListener.java
	smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
	smack-core/src/main/java/org/jivesoftware/smack/debugger/SmackDebugger.java
	smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java
	smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java
	smack-core/src/test/java/org/jivesoftware/smack/ThreadedDummyConnection.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/address/provider/MultipleAddressesProvider.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/DataListener.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FaultTolerantNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IBBTransferNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/Socks5TransferNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java
	smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java
	smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
	smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java
	smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/UserID.java
	smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java
	smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
	version.gradle
2015-03-04 22:42:36 +01:00
Florian Schmaus e9dd3e2fa6 Add copy constructor to Message and Presence
and also implement Cloneable and add clone() methods.
2015-02-23 22:15:59 +01:00
Florian Schmaus 5bb4727c57 Use Jid (and subclasses) from jxmpp-jid
Fixes SMACK-634
2015-02-17 16:07:16 +01:00
Florian Schmaus 4698805a34 Rename 'Packet' class to 'Stanza'
Smack still uses the term 'Packet' in some places. This is just the
first step towards using correct XMPP terms in Smack.
2015-02-06 09:34:51 +01:00
Florian Schmaus ed4d815fba Make Message.setType(Type) not throw if type is null
RFC 6121 § 5.2.2:
"""
If an application receives a message with no 'type' attribute or the
application does not understand the value of the 'type' attribute
provided, it MUST consider the message to be of type "normal" (i.e.,
"normal" is the default).
"""
2015-01-26 20:47:14 +01:00
Florian Schmaus ba2df2a995 Add Message(String,String) 2014-12-01 14:40:58 +01:00
Florian Schmaus 252d5172e9 Return more specific types (e.g. Collection → List)
be generic as possible in what you accept, but more specific in what you
return.

Also tweak MultiuserChatManager methods a bit.
2014-11-29 13:41:49 +01:00
Florian Schmaus 9e797c1b17 Enable PacketExtensions for IQs
This is actually only part one, i.e. with this commit if the user adds a
PacketExtension to an IQ it will be included in IQ.toXml(). Which was
previously only the case if the IQ subclass explicitly included packet
extensions.

The second part of the change is to change the IQ provider, so that
packet extensions are automatically parsed.

Cases where PacketExtensions are used for Message and IQ are slightly
changed. The IQ sublcass now only has a field with this
PacketExtension (see for example
bytestreams.ibb.packet.DataPacketExtension).

Also changed hoxt API: Removed unnecessary indirection and made the
API more Smack idiomatic.
2014-11-10 11:43:18 +01:00
Florian Schmaus d60b63a89a Remove hashCode/equals from Message and Packet
Those where never correctly implemented and are not really used. If you
want to compare Packets, compare their toXML() result.

N.B. that we keep hashCode/equals for Message.(Subject|Body) because
those are correct and are in-use ('bodies' and 'subjects' are Sets in
Message).
2014-10-28 15:11:48 +01:00
Florian Schmaus 416f42deb7 Make fields in Packet and Message final 2014-10-28 15:11:48 +01:00
Florian Schmaus 10cca256c6 Remove unnecessary code in Message 2014-10-24 11:45:22 +02:00
Florian Schmaus ce8ccf3647 Make Message and Presence class final
In order to prevent users from trying to subclass those two, trying to
add their custom attributes (or attribute values) in the element of
those two, instead of using extension elements aka. PacketExtension.

See

- http://stackoverflow.com/q/26516386/
- http://stackoverflow.com/q/26507753/
- http://stackoverflow.com/q/26542601/
2014-10-24 11:14:41 +02:00
Florian Schmaus c024931de8 Remove XmlLangStanza
since all stanza types could have 'xml:lang' defined as top-level
stream element attribute.
2014-09-12 11:26:09 +02:00
Florian Schmaus fc51f3df48 Add support for XEP-0198: Stream Management
- De-duplicate code by moving it into AbstractXMPPConnection
- Introduce TopLevelStreamElement as superclass for all XMPP stream elements.
- Add SynchronizationPoint, ParserUtils
- Add ParserUtils

Fixes SMACK-333 and SMACK-521
2014-09-11 09:49:16 +02:00
Florian Schmaus 90c0064394 Add XmlLangStanza, to share the language field
between Message and Presence.
2014-09-03 18:11:32 +02:00
Florian Schmaus 67011fc322 Remove xmlns field from Packet
Stanzas do not have a xmlns attribute in their top level element.
2014-09-03 17:56:51 +02:00
Florian Schmaus bbf89c65bf Fix typo in XmlStringBuilder, it's not an Angel
s/rightAngelBracket/rightAngleBracket/
2014-08-20 21:25:14 +02:00
Florian Schmaus 7277eb553a Enable more 'checkstyle' checks
AvoidStarImport
IllegalImport
RedundantImport
UpperEll
ArrayTypeStyle
GenericWhitespace
EmptyStatement
PackageDelcaration
2014-08-15 23:17:45 +02:00
Florian Schmaus 8b16c49a31 Remove Packet.ID_NOT_AVAILABLE 2014-07-06 23:57:06 +02:00
Florian Schmaus d8d88d9abd Make XHTMLText use XmlStringBuidler
also define all element and attribute names as constants.
2014-07-05 14:19:31 +02:00
Florian Schmaus 009057e2e2 Streamline String to Enum transformation
for the core stanza Enums.
2014-06-10 18:35:24 +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 core/src/main/java/org/jivesoftware/smack/packet/Message.java (Browse further)