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

140 commits

Author SHA1 Message Date
Florian Schmaus
3f9ca68134 Delete TypedCloneable 2020-06-14 17:38:51 +02:00
Florian Schmaus
d65f2c932e Bump Error Prone version to 2.3.4 and fix new bug patterns 2020-05-24 21:10:01 +02:00
Florian Schmaus
ab2d3a2b79 [core] Deprecate AbstractConnectionListener 2020-05-13 22:14:43 +02:00
Florian Schmaus
eb4c2c5572 s/occured/occurred/ 2019-10-30 12:02:36 +01:00
Florian Schmaus
5db6191110 Introduce StanzaBuilder
As first step to immutable Stanza types.
2019-10-25 21:41:55 +02:00
Florian Schmaus
65576cf3c2 Rework XML Element hierarchy and XmlStringBuilder
- Reduce the amount of types that are subtypes of NamedElement. See
javadoc of NamedElement for rationale.
- Work more with XmlEnvironment in XmlStringBuilder.
- Some minor changes to XmlStringBuilder API.
2019-09-07 18:17:08 +02:00
Florian Schmaus
1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus
f863bd222c Merge branch '4.3' 2019-08-22 11:52:41 +02:00
Florian Schmaus
d40b16b5a7 Fix log message format in Roster: s/{}/{0}/
The MessageFormat used by the JUL Logger requires integers between the
curly brackets (unlike SLF4J).
2019-08-22 10:55:33 +02:00
Florian Schmaus
4ca2c7cc69 Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks 2019-07-24 09:18:39 +02:00
Florian Schmaus
91ec6cc955 Javadoc changes for Java 11 compatibility 2019-07-19 23:05:46 +02:00
Florian Schmaus
fa0c16d75c Introduce EqualsUtil and HashCode.(Builder|Cache) 2019-06-12 14:51:17 +02:00
Florian Schmaus
f7762c5db7 Add "whitespace after comma" checkstyle rule 2019-05-17 21:56:46 +02: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
af0fb7543c
Merge pull request #309 from vanitasvitae/rosterListenerDoc
Add missing Roster documentation
2019-04-06 15:19:59 +02:00
af88227919
Add missing Roster documentation 2019-04-06 02:36:32 +02:00
Florian Schmaus
d10319f1a0 Merge branch '4.3' 2019-04-05 10:22:12 +02:00
Florian Schmaus
9be498c440 Fix NPE in Roster's presence listeners if 'from' is not set
The NPE is caused by an inbound presence stanza without the 'from'
attribute set. The stacktrace of the NPE is:

FATAL EXCEPTION: Smack Cached Executor
Process: de.fhg.ivi.senetz.mobile.android.mbk.debug, PID: 13365
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:944)
    at org.jivesoftware.smack.roster.Roster.getPresencesInternal(Roster.java:374)
    at org.jivesoftware.smack.roster.Roster.getOrCreatePresencesInternal(Roster.java:388)
    at org.jivesoftware.smack.roster.Roster.access$1100(Roster.java:94)
    at org.jivesoftware.smack.roster.Roster$PresencePacketListener$1.run(Roster.java:1519)
    at org.jivesoftware.smack.AsyncButOrdered$Handler.run(AsyncButOrdered.java:121)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:764)

Thanks to Marcel Heckel for reporting this.

Fixes SMACK-861.
2019-04-02 14:28:41 +02:00
Florian Schmaus
9c4e5d0330 Add Roster.createItem() and Roster.createItemAndRequestSubscription()
and deprecate createEntry().

createEntry() would also send a subscription request which may is
suprising given that you can also create an roster item without having
to send a subscription request out.

This also fixes a bug in
LowLevelRosterIntegrationTest.testPresenceEventListenersOffline()
where createEntry() was used, which would also trigger a presence
subscription request which in turn made the test fail if the
SubscribeListener of ensureSubscribedTo() was not yet set
up. So the test would fail depending on the timing.
2019-03-16 21:23:45 +01:00
Florian Schmaus
8df69bd3ce Use XmlEnvironment in parsing/provider subsystem 2019-02-15 23:21:30 +01:00
Florian Schmaus
083dac8b83 Rework exceptions in the parsing / provider subsystem 2019-02-05 13:18:03 +01:00
Florian Schmaus
fee3ed81ca Introduce XmlEnvironment 2019-02-05 13:18:03 +01:00
Florian Schmaus
b7ea226c56 Bump "Error Prone" to 2.3.2
and gradle-errorprone-plugin to 0.6.
2018-10-31 16:06:31 +01:00
Florian Schmaus
ab120691cb Smack 4.3.1
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlvDIBdfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFKObAgApvEwstvSXhgzlrA46DM6fXezbPEnO1rh8rCPJEAsmfBSnyINSuuhelzw
 zN8L7GAU0jDeuDivxA12vQx5QB8wuCHKgc5pXDKNRi9eUdsyDUMKswcbMMAJWDvq
 I3bm7TOC1D9ZWmfhGmqfulrsVD1Q0wh+P2A1/CWVR5ZZUB5S4fESFZUrnCfJmeXe
 f+INXUiui3otAF6nPxKm782rSfHWvA32i4Obnagh3oPX/c9R7Ftb78Wukrsbaqfg
 +a5iTlBJXLG75/Yozq+JqmWlUvEKv7le0vkF5fF+oc76H4p1U1wqQyIMei/Pwaer
 H/SyMqLPzCiwpUHiunpWD13e5kkeLw==
 =47on
 -----END PGP SIGNATURE-----

Merge tag '4.3.1'

Smack 4.3.1
2018-10-14 14:31:31 +02:00
spslinger
1e21ab763c
Fix getPresence ConcurrentModificationException
Fix for SMACK-841

Since Smack 4.2.4, the getPresencesInternal method in the Roster class
can return a LruCache object, which is a LinkedHashMap with access
order. This means that any access using get or getOrDefault will be a
modification of the Map. If you loop over the keySet of the Map and
there are more than one, the second call to get will throw a
ConcurrentModificationException!

Since the keys are only used here to obtain the corresponding
values, the simplest solution is to just loop over the values instead.
2018-10-11 12:29:32 +02:00
Florian Schmaus
24267c532d Improve style of RosterStore 2018-08-21 13:33:45 +02:00
Florian Schmaus
e8923b9d16 Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
2018-05-09 23:26:39 +02:00
Florian Schmaus
5ab2903c32 Change Element.toXml() to toXml(String enclosingNamespace) 2018-04-27 10:05:25 +02:00
Florian Schmaus
476fdf99a1 Inroduce AsyncButOrdered 2018-04-08 21:21:50 +02:00
Florian Schmaus
2efec89050 Rename XMPPError to StanzaError
Fixes SMACK-769.
2018-04-07 22:59:25 +02:00
Florian Schmaus
a9ca1a0989 Enable ModifierOrder checkstyle check
Fixes SMACK-812
2018-03-29 12:35:11 +02:00
Florian Schmaus
193688e553 Merge branch '4.2' 2018-03-28 12:51:28 +02:00
Florian Schmaus
5b9254aff5
Merge pull request #209 from fuentesj11/rename-deprecate-xmppconnection-methods
Rename and deprecate XMPPConnection methods
2018-03-28 12:11:32 +02:00
Jesus Fuentes
a70063dc89 Rename and deprecate XMPPConnection methods
Rename and deprecate XMPPConnections methods as described in SMACK-802
2018-03-22 15:40:40 -05:00
Florian Schmaus
f42d9137b5 Merge branch '4.2' 2018-03-21 15:22:22 +01:00
Florian Schmaus
dddf62763e Also store unavailable presences in the map for non-Roster presences
Fixes SMACK-808.
2018-03-13 19:38:07 +01:00
Florian Schmaus
1fd03c396a Make Roster's non-roster presence second-level map bounded
Fixes SMACK-809.
2018-03-13 19:38:07 +01:00
Jesus Fuentes
903f90e1c1 Update/fix javadocs 2018-03-09 07:15:46 -06:00
Florian Schmaus
a48e8ef843 Merge branch '4.2' 2018-02-21 20:13:05 +01:00
9f47daa7ad
Add missing package-info descriptions. 2018-02-21 16:47:11 +01:00
Florian Schmaus
3c4225d167 Merge branch '4.2' 2017-12-25 14:16:43 +01:00
Florian Schmaus
34373e8710 Enable javadoc 'html' doclint
Also make all 'test' tasks depend on the 'javadoc' task.

Fixes SMACK-650.
2017-12-25 14:08:18 +01:00
Florian Schmaus
431e5b3c67 Merge branch '4.2' into master-paul-merged 2017-12-17 11:16:02 +01:00
cb18056613 Fix minor codestyle issues 2017-12-17 11:03:46 +01:00
Florian Schmaus
81002c4fbd Merge branch '4.2' 2017-11-22 08:37:47 +01:00
Florian Schmaus
65b4f506dc Add SubscribeAnswer.ApproveAndAlsoRequestIfRequired 2017-11-06 22:41:28 +01:00
Florian Schmaus
9a34e9e870 Add RosterUtil.preApproveSubscriptionIfRequiredAndPossible() 2017-11-06 22:39:10 +01:00
Florian Schmaus
384c285fbc Merge branch '4.2' 2017-10-14 14:56:36 +02:00
iachimoe
c92a95136f Updated comments to indicate that reject_all is default SubscriptionMode 2017-08-26 12:16:07 -05:00
Florian Schmaus
6203d163c4 Deprecate old async API 2017-08-16 13:46:42 +02:00