1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-24 15:22:07 +01:00
Commit graph

4187 commits

Author SHA1 Message Date
Florian Schmaus
b5f9d4d7a3 Introduce test fixtures
This also removes the powermock dependency. Although powermock is a
fine library, it currently prevents dropping Junit4. And since we only
use the Whitebox API of powermock, this simply replaced powermock's
Whitebox with our own.
2020-04-11 22:05:36 +02:00
Florian Schmaus
4a99f7252c gradle: remove 'java' plugin
Only one plugin of 'java' of 'java-library' is required.
2020-04-11 18:06:03 +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
594d2f5238 sinttest: convert LoginIntegrationTest to Junit5 2020-04-11 12:18:18 +02:00
Florian Schmaus
adfca965b5 Merge branch 'master' of github.com:igniterealtime/Smack 2020-04-10 21:10:20 +02:00
Florian Schmaus
993bed07ef readme: replace IRC badge with XMPP MUC badge 2020-04-10 19:52:43 +02:00
Florian Schmaus
79b9c7b934 sinttest: add testDisconnectedNeverConnected for modular connection 2020-04-09 21:09:42 +02:00
Florian Schmaus
e68b89d266 sinttest: rename and move ModularXmppClientToServerConnection test
Rename and move the test in the correct package.
2020-04-09 21:09:17 +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
53c28f72ad
Merge pull request #351 from adiaholic/docFix
Correct code example inside `UserTuneElement`.
2020-04-09 17:23:16 +02:00
Florian Schmaus
390f7823e1 mam: add javadoc for parameter 2020-04-09 15:22:33 +02:00
Florian Schmaus
b8b084970e mam: remove deprecated method in MamManager 2020-04-09 15:21:50 +02:00
Florian Schmaus
1e5ea1fdbe mam: remove dead code in MamManager 2020-04-09 15:20:00 +02:00
Florian Schmaus
353e43407f mam: support of advanced configuration
Fixes SMACK-822.

Co-authored-by: Jagmeet Singh <jagmeets@zeta.tech>
2020-04-09 15:18:02 +02:00
Florian Schmaus
bf92712f4c legacy: merge workgroup.providers into legacy.providers
Previously the workgroup providers where not automatically loaded by
Smack. Fixes SMACK-729.
2020-04-09 15:14:09 +02:00
Florian Schmaus
f1dd925844 Mark code from the old integration-test dir as migration candidates 2020-04-09 15:14:09 +02:00
Florian Schmaus
f329b447f2 Delete some outdated code from the old integration-test dir
The code in the integration-test/ directories should either be
migrated to sinttest (or unit tests), or get deleted. This is a first
small step towards this goal.
2020-04-09 15:14:09 +02:00
Florian Schmaus
57d7ac4d5d Remove smack-compression-jzlib
The smack-compression-jzlib subproject is obsolete since Java 7 de-
and inflate support was added with SMACK-389. Now it is time to remove
it.

Fixes SMACK-840.
2020-04-09 15:14:09 +02:00
Florian Schmaus
5579567572 core: use addCompressionHandler() instead directly adding to the list 2020-04-09 15:14:09 +02:00
adiaholic
4991c952e7 Correct code example inside UserTuneElement. 2020-04-09 18:38:21 +05:30
Florian Schmaus
eaa94be7e6
Merge pull request #356 from vanitasvitae/improveAttention
Improve attention
2020-04-09 14:28:54 +02:00
Florian Schmaus
e70506152e
Merge pull request #357 from vanitasvitae/nicktest
Add Nick JUnit test
2020-04-09 14:28:08 +02:00
b5caf13c8a
Add Nick JUnit test 2020-04-08 22:15:29 +02:00
ffbd97ff10
Add AttentionElementTest 2020-04-08 22:09:13 +02:00
Florian Schmaus
10aee6c787 http-file-upload: make order of parameters more logical 2020-04-08 14:33:09 +02:00
Florian Schmaus
e2d393d00d tcp: add newline for better readability 2020-04-08 14:31:00 +02:00
Florian Schmaus
51b167c0d4 tcp: do not flush after writing the SM ack
There is no need to flush here, as writePackets() will eventually
flush the data out.
2020-04-08 14:31:00 +02:00
Florian Schmaus
bfff412112 tcp: increase unack'ed stanza queue size, decrease ack request limit
To reduce the chances of a deadlock between read and writer if SM
unacked stanza queue is full. See SMACK-881.
2020-04-08 14:31:00 +02:00
Florian Schmaus
9c7f62ec07
Merge pull request #319 from adiaholic/SMACK-867
Extend HttpFileUploadManager with InputStream parameter
2020-04-08 14:30:35 +02:00
adiaholic
dfa61c3058 Extend HttpFileUploadManager with InputStream parameter
Add support for InputStreams as Android is tending towards
inputStreams over file uploads.
Solves SMACK-867
2020-04-08 12:02:16 +05:30
Florian Schmaus
a564620383 sinttest: add 'dnsResolver' setting 2020-04-07 20:59:32 +02:00
Florian Schmaus
5b805336ce
Merge pull request #375 from adiaholic/junit5
Replace JUnit4 with JUnit5 in `smack-extensions`.
2020-04-07 17:46:19 +02:00
Florian Schmaus
d4c1216fb1 Merge branch 'master' of github.com:igniterealtime/Smack 2020-04-07 17:43:29 +02:00
Florian Schmaus
3b27eb520f sinttest: Use Thread.sleep(15) instead of Thread.yield()
Guus reports that the entity caps sinttest fails on openfire with an
timeout exception on Java 11. Very well possible that this is caused
by a changed scheduling behavior where the yield() thread nevertheless
dominates the, potential single, core.

The waitUntilThread() method is essentially a broken approach anyway
and should be replaced in the future.
2020-04-07 16:58:21 +02:00
Florian Schmaus
398cba330b gradle: add support for custom repo to publish to
And introduce useSonatype setting to skip the sonatype repos if
desired.
2020-04-07 16:56:54 +02: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
ea944a8dc6 build.gradle: remove OSGi leftovers
OSGi support was rapped with d06f533bb ("Drop OSGi support").
2020-04-07 10:02:22 +02:00
Florian Schmaus
078cb5cc8f
Merge pull request #366 from vanitasvitae/offlineMessage
Prevent multi-instancing of OfflineMessageManager
2020-04-06 09:22:26 +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
69e9f3c044 Remove deprecated GroupChatInvitation.getFrom() 2020-04-05 22:14:27 +02:00
Florian Schmaus
0967019a5f Remove deprecated Forwarded.getForwardedPacket()
This method was deprecated with 1cd268a8f ("Deprecate
Forwarded.getForwardedPacket()").
2020-04-05 22:13:14 +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