Florian Schmaus
054fd9ae44
[core] Replace 'packet' with 'stanza' in Presence's javadoc
2020-05-22 09:25:15 +02:00
Florian Schmaus
962071762a
[core] Optimize Presence.toXML() for empty element
2020-05-22 09:20:02 +02:00
Florian Schmaus
33720e8d97
[core] Fix potential NPE in Java7ZlibInputOutputStream
...
The field XMPPInputOutputStream.flushMethod was not initialized, which
could cause an NPE in the "switch (flushMethod)" found in
Java7ZlibInputOutputStream.getOutputStream().
2020-05-21 12:47:55 +02:00
Florian Schmaus
87591655ad
[core] Add StanzaFilter.asPredicate(Class)
2020-05-18 09:15:14 +02:00
Florian Schmaus
72c5dc5886
[core] Introduce ScheduledAction.Kind for blocking and non-blocking actions
2020-05-18 09:15:14 +02:00
Florian Schmaus
4e5536e227
[core] Make ScheduledAction.cancel() return boolean and add javadoc
2020-05-18 09:15:14 +02:00
Florian Schmaus
6daf19dbd3
[core] Add javadoc to SmackReactor.cancel(ScheduledAction)
2020-05-18 09:15:14 +02:00
Florian Schmaus
dfdd0acf91
Introduce AbstractStats
2020-05-18 09:15:14 +02:00
dc64a43f12
Prevent NPE when closing trust store stream
2020-05-17 17:01:42 +02:00
d903184ee2
Quick typo fix: s/isntead/instead/g
2020-05-13 22:32:18 +02:00
Florian Schmaus
ab2d3a2b79
[core] Deprecate AbstractConnectionListener
2020-05-13 22:14:43 +02:00
Florian Schmaus
498dde2d86
Merge branch 'master' of github.com:igniterealtime/Smack
2020-05-13 20:20:01 +02:00
Florian Schmaus
77e26fc575
Re-work data form API
...
Apply builder pattern to form fields and replace getVariable() with
getFieldName(). Refer to the field name as "field name" instead of
"variable" everyone, just as XEP-0004 does.
Improve the high-level form API: introduce FilledForm and FillableForm
which perform stronger validation and consistency checks.
Also add FormFieldRegistry to enable processing of 'submit' forms
where the form field types are omitted.
Smack also now does omit the form field type declaration on 'submit'
type forms, as it is allowed by XEP-0004.
2020-05-13 20:14:41 +02:00
Guus der Kinderen
577c59484b
pep: notification type can be normal or headline
2020-05-12 19:57:56 +02:00
Florian Schmaus
5e921e6393
core: add javadoc for StanzaView.getExtensions(Class)
2020-04-18 22:56:10 +02:00
Florian Schmaus
cdc5396f6c
core: improve signature of Stanza.addExtensions()
2020-04-18 19:03:43 +02:00
Florian Schmaus
ad13effe41
Merge pull request #382 from vanitasvitae/typo
...
Fix typo in XmppElementUtil
2020-04-13 23:03:34 +02:00
Florian Schmaus
f3e93cef32
core: do not init() closingStreamReceived sync point in initState()
...
The initState() method is also called in disconnect(). And if we reset
the closingStreamReceived sync point at disconnect, it will break the
WaitForClosingStreamElementTest integration test.
2020-04-13 22:50:02 +02:00
Florian Schmaus
6c3cd53567
pep: improve pep event filter
2020-04-13 22:37:54 +02:00
Florian Schmaus
50da46ffda
core: Add ExtensionElementFilter
2020-04-13 21:27:31 +02:00
Florian Schmaus
5114f6dfa4
core: remove deprecated methods in PacketUtil
...
Those where deprecated in 2015 with 8409dddff
("Add
PacketUtil.extensionElementFrom()"), and in 2017 with
2288825b1
("Retain smack-core API").
2020-04-13 21:25:28 +02:00
Florian Schmaus
fb7054bbe7
core: delete deprecated ToFilter
...
This filter was marked deprecated in 2017 with 5d0dd49e6
("Introduce
ToMatchesFilter"), time to delete it.
2020-04-13 20:54:04 +02:00
Florian Schmaus
988954a9db
core: delete deprecated filters
...
Those where deprecated in 2015 with d4a6d8e65
("Rename
PacketFilter (and implementing classes) and PacketExtension"), now it
is time to delete them.
2020-04-13 20:52:07 +02:00
Florian Schmaus
c49999b933
core: add shortcut via hash in EqualsUtil
...
Return false as soon as the hashed value does not match. This is
sound, since every class that implements equals(Object) should also
implement hashCode().
2020-04-13 20:40:10 +02:00
905d5dc102
Fix typo in XmppElementUtil
2020-04-13 18:18:31 +02:00
Florian Schmaus
5438fb7b33
core: add hint towards StanzaView.getExtension(Class)
2020-04-12 12:17:05 +02:00
Florian Schmaus
d498cd8499
core: re-add Stanza.getExtension(String, String) and mark deprecated
...
This method was removed with 07da9ffb4
("Do not have
Stanza.getExtension(String, String) return a generic type"). In order
to aide migration to the newer API, this commit re-adds the method and
marks it as deprecated.
2020-04-12 12:17:05 +02:00
Florian Schmaus
7bc2ebb731
core: fix javadoc of Stanza.getExtensionElement(String, String)
...
The element name must not be null or empty.
2020-04-12 12:17:05 +02:00
Florian Schmaus
7a57bb7c09
Rename Stanza.getExtension(String, String) to getExtensionElement()
2020-04-12 12:09:04 +02:00
Florian Schmaus
4ccced906e
core: add SuppressWarnings("static-method") to getReactor()
2020-04-11 22:07:16 +02:00
Florian Schmaus
2c83c73005
core: Avoid ClassCastException in getExtension(Class)
...
Ensure that he returned extension element is actually of the correct
type. It should not be common, but in theory, Smack's provider
architecture would allow for different types to be returned than the
ones one may expect.
2020-04-11 18:04:15 +02:00
Florian Schmaus
85af4a022d
compression: remove Android SDK level < 19 compatiblity
...
Since we now require Android SDK 19 or higher, we can use the method
directly.
2020-04-09 20:54:36 +02:00
Florian Schmaus
5579567572
core: use addCompressionHandler() instead directly adding to the list
2020-04-09 15:14:09 +02:00
Florian Schmaus
8b0de5ff85
Introduce TLSUtils.setEnabledTlsProtocolsToRecommended(B builder)
...
And deprecate no longer recommended methods.
Thanks to Milan Kral <milan.kral@azet.sk> for the initial PR which
triggered this commit.
2020-04-05 22:28:01 +02:00
Florian Schmaus
07da9ffb48
Do not have Stanza.getExtension(String, String) return a generic type
...
Returning a generic would allow for
List<ExtensionElement> list = stanza.getExtension("foo", "bar");
to compile (Note the we are calling getExtension(), not
getExtension*s*()).
Users are encouraged to use the type safe getExtension(Class<? extends
ExtensionElement) variant instead.
Fixes SMACK-825.
2020-04-05 22:10:05 +02:00
Florian Schmaus
62916b8490
Improve exception message of XmppElementUtil.getQNameFor()
2020-04-05 22:08:10 +02:00
Florian Schmaus
8d432e2303
Add StanzaView.hasExtension(Class<? extends ExtensionElement>)
2020-04-05 19:59:24 +02:00
Florian Schmaus
5380e5705f
Remove deprecated Packet(Extension) and DefaultExtensionElement types
...
Those where deperecated in 2015. Time to remove them.
2020-04-05 19:12:10 +02:00
Florian Schmaus
3382cbdf44
Delete superfluous newline in SmackInitialization
2020-04-05 18:59:28 +02:00
Florian Schmaus
439e29a1c7
Do not import Message.Body explicitly in SmackInitialization
2020-04-05 18:59:02 +02:00
Florian Schmaus
14c351397d
Implement message stanza <thread/> and <subject/> as ExtensionElement
...
Fixes SMACK-852.
2020-04-05 18:58:13 +02:00
Florian Schmaus
f9fb4d7627
Remove deprecated XmlStringBuilder.rightAngelBracket()
...
This method was marked deprecated with bbf89c65b
("Fix typo in
XmlStringBuilder, it's not an Angel"). Now it is time to remove it.
2020-04-05 17:26:21 +02:00
Florian Schmaus
12e20c2d6c
Remove deprecated methods/fields scheduled for removal in Smack 4.4
2020-04-04 13:03:48 +02:00
Florian Schmaus
cc636fff21
Introduce Smack's Modular Connection Architecture
...
This is a complete redesign of what was previously
XmppNioTcpConnection. The new architecture allows to extend an XMPP
client to server (c2s) connection with new transport bindings and
other extensions.
2020-04-04 13:03:31 +02:00
Florian Schmaus
39a833166a
Add workaround for truststores in JKS format when using Java >= 9
2020-03-13 16:40:46 +01:00
Florian Schmaus
863d0bf403
Fix NPE in ServiceDiscoveryManager
2020-03-09 14:41:52 +01:00
Florian Schmaus
00dd77b346
Try to guess the default truststore and path
...
Tested with OpenJDK 8 and 11. The 'JKS' fallback is for OpenJDK 11.
2020-03-09 13:39:19 +01:00
Florian Schmaus
6440f322fe
Ensure a X509TrustManager is set
2020-03-09 10:12:43 +01:00
Florian Schmaus
961e56a47c
proxy: modernize code by using (ByteArrayOutput|DataInput)Stream
2020-02-23 19:12:54 +01:00
Florian Schmaus
b6ad737aa4
proxy: do not call setTcpNoDelay() but instead flush the stream
2020-02-23 19:12:54 +01:00