Florian Schmaus
41f5cf8435
Remove unused LOGGER from ServiceDiscoveryManager
2018-02-21 20:21:10 +01:00
Florian Schmaus
98708d67a2
Make ServiceDiscoveryManager.findService() consider all services
...
with the same matching feature announced.
Consider for example PubSub where usually the service itself announces
the PubSub feature as part of PEP, and where an additional PubSub
component exists. The old logic will just lookup the first matching
service with a PubSub feature announcement and check if for a matching
identiy. If we look for a real PubSub service, but stumble first over
user's service with PEP, then findService() will return 'null' although
there would have been a valid PubSub service.
Fixes SMACK-805.
2018-02-21 20:09:11 +01:00
Florian Schmaus
64f41364f9
Merge pull request #207 from vanitasvitae/descriptions
...
Add missing package-info.java descriptions.
2018-02-21 20:08:39 +01:00
9f47daa7ad
Add missing package-info descriptions.
2018-02-21 16:47:11 +01:00
Florian Schmaus
245a3b3851
Use the correct ad-hoc action in ServiceAdministrationManager
...
Fixes SMACK-804. Thanks to Holger Weiß for his help with the issue.
Smack would always use the 'next' action only 'execute' (which is
always allowed) and 'complete' where candidates.
Example XMPP trace:
SENT: <iq to='salem.geekplace.eu' id='f0JiQ-45' type='set'><command xmlns='http://jabber.org/protocol/commands ' node='http://jabber.org/protocol/admin#add-user ' action='execute'></command></iq><r xmlns='urn:xmpp:sm:3'/>
RECV: <iq xml:lang='en' to='sinttest-admin@salem.geekplace.eu/one-phx8g' from='salem.geekplace.eu' type='result' id='f0JiQ-45'>
<command status='executing' sessionid='2018-02-21T14:48:13.508812Z' node='http://jabber.org/protocol/admin#add-user ' xmlns='http://jabber.org/protocol/commands '>
<actions execute='complete'>
<complete/>
</actions>
<x type='form' xmlns='jabber❌ data'>
<title>Add User</title>
<field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/admin </value></field>
<field var='accountjid' type='jid-single' label='Jabber ID'><required/></field>
<field var='password' type='text-private' label='Password'><required/></field>
<field var='password-verify' type='text-private' label='Password Verification'><required/></field>
</x>
</command>
</iq>
SENT:
<iq to='salem.geekplace.eu' id='f0JiQ-49' type='set'>
<command xmlns='http://jabber.org/protocol/commands ' node='http://jabber.org/protocol/admin#add-user ' sessionid='2018-02-21T14:48:13.508812Z' action='next'>
<x xmlns='jabber❌ data' type='submit'>
<field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/admin </value></field>
<field var='accountjid' type='jid-single'><value>smack-inttest-one-phx8g@salem.geekplace.eu</value></field>
<field var='password' type='text-private'><value>L2Cz2gKeVsBAEBRJ</value></field>
<field var='password-verify' type='text-private'><value>L2Cz2gKeVsBAEBRJ</value></field>
</x>
</command>
</iq>
RECV:
<iq xml:lang='en' to='sinttest-admin@salem.geekplace.eu/one-phx8g' from='salem.geekplace.eu' type='error' id='f0JiQ-49'>
<command action='next' sessionid='2018-02-21T14:48:13.508812Z' node='http://jabber.org/protocol/admin#add-user ' xmlns='http://jabber.org/protocol/commands '>
<x type='submit' xmlns='jabber❌ data'>
<field var='FORM_TYPE' type='hidden'><value>http://jabber.org/protocol/admin </value></field>
<field var='accountjid' type='jid-single'><value>smack-inttest-one-phx8g@salem.geekplace.eu</value></field>
<field var='password' type='text-private'><value>L2Cz2gKeVsBAEBRJ</value></field>
<field var='password-verify' type='text-private'><value>L2Cz2gKeVsBAEBRJ</value></field>
</x>
</command>
<error code='400' type='modify'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Unexpected action</text>
</error>
</iq>
2018-02-21 16:34:03 +01:00
Florian Schmaus
278c15d52d
Deprecate some chat2 ChatManager APIs
...
because their functional interfaces clashes. This helps to prepare
Smack for Java 8 where such a construct results in a compile time error.
2018-02-10 12:10:19 +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
52398b535f
Fix javadoc issues in some packages
2017-12-23 20:21:19 +01:00
cb18056613
Fix minor codestyle issues
2017-12-17 11:03:46 +01:00
Florian Schmaus
a25971d02b
Add AffiliationsExtensionTest
2017-12-05 20:50:34 +01:00
Florian Schmaus
ca1852f6e0
Fix AffiliationsExtension.toXml()
...
Fixes SMACK-789.
2017-12-05 20:50:34 +01:00
Florian Schmaus
2edbc64957
Refactor reconnection callbacks into an extra class
...
Fixes SMACK-775
2017-11-25 16:30:18 +01:00
Florian Schmaus
9e11b68144
Add comment style checkstyle rule requiring a space
2017-11-20 08:53:19 +01:00
Florian Schmaus
52bd680bb5
Fix OfflineMessageManager.getMessages(List<STring>)
...
by implementing a new logic how the messages are retrieved.
Previously in case the node list has exactly one item, the method
would perform an unnecessary call to nextResult() causing a delay.
Fixes SMACK-785.
2017-11-18 15:58:08 +01:00
Florian Schmaus
0da3ebf385
Make MUC invitation rejected filter also filter by room address
...
Fixes SMACK-783.
2017-11-12 12:20:08 +01:00
Florian Schmaus
a66c42834f
Add findServicesDiscoveryInfo() variant
...
which does not log some exceptions, but instead comes with an optional
output paramater which returns the encountered exceptions.
2017-11-09 18:16:08 +01:00
Florian Schmaus
5ef6853db6
Improve MultiUserChat's leave() and destroy() login
...
Remove the "if (!joined) return" guard in leave() this allows to
resync the instances state with the real world state in case they ever
get out of sync.
Also call userHasLeft() in even if leave() throws and in certain
situations if destroy() throws.
Thanks to Дамян Минков and Ingo Bauersachs for pointing this out.
2017-11-07 20:38:19 +01:00
Florian Schmaus
0a4cd79d4e
Call MultiUserChat.userHasLeft() before invoking listeners
...
in case a listener throws, userHasLeft() will eventually have set the
MutliUserChat instance to the right state.
2017-11-07 20:34:43 +01:00
Florian Schmaus
d93d214f0e
Remove duplicate code in MultiUserChat
2017-11-07 20:34:43 +01:00
damencho
44e4607259
Fix memory leak in MutliUserChat.removeConnectionCallback().
...
Fix memory leak by removing subject listener
in MutliUserChat.removeConnectionCallback().
Fixes SMACK-782.
2017-11-07 20:34:43 +01:00
Florian Schmaus
65b4f506dc
Add SubscribeAnswer.ApproveAndAlsoRequestIfRequired
2017-11-06 22:41:28 +01:00
Florian Schmaus
0729392ab8
Fix isSupported discovery of "Push Notifications"
...
Fixes SMACK-780.
2017-10-14 14:12:28 +02:00
Florian Schmaus
772e45da92
Introduce NotAPubSubNodeException
...
Fixes SMACK-759.
2017-08-14 20:23:35 +02:00
Ingo Bauersachs
c9b9558cd4
Make add/remove for presence interceptors consistent
2017-08-01 16:17:35 +02:00
Ingo Bauersachs
0b8788a9fc
Fix parameter ordering in BoBHash construction
2017-07-20 22:50:34 +02:00
Florian Schmaus
759a7d7a70
Fix InitationListenerTest's timeouts
...
Don't use Thread.sleep(), isntead we use Mockito's timeout() method.
2017-06-16 22:51:14 +02:00
Florian Schmaus
08e897113d
Add CustomImportOrder checkstyle rule
...
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus
ce36fb468c
Increase getSocket() timeout in Socks5ClientForInitiatorTest
...
This will hopefully reduce the false negatives when running the unit
tests with Travis CI.
2017-06-02 12:03:46 +02:00
Florian Schmaus
ce1cddc722
More checkstyle whitespace related checks
2017-05-24 14:42:38 +02:00
Alexander Tovstonozhenko
b636883ce6
Fix NPE in hashCode() in Occupant when jid is null
...
Fixes SMACK-764.
2017-05-19 14:09:19 +03:00
Florian Schmaus
5f900d3713
Add PingManager.pingAsync(Jid, long)
...
and SmackFuture API.
2017-05-16 15:53:03 +02:00
Florian Schmaus
5aab471d64
Improve handling of error response "Pongs"
2017-05-16 15:53:03 +02:00
Florian Schmaus
48b5dc5fe7
Conditionially set the IQ type in ThreadedDummyConnection
...
and do not set 'from'.
2017-05-16 15:53:03 +02:00
Florian Schmaus
24f6d86452
Fix typo: s/ProsoydWorkaround/ProsodyWorkaround/
2017-04-19 12:23:17 +02:00
Florian Schmaus
ddf888e607
Do not return null in getLeafNodeProsodyWorkaround
...
and rethrow the original exception.
2017-04-19 12:21:04 +02:00
Florian Schmaus
bfab3ec578
PubSubManager.getLeafNode(): Actually employ the prosody workaround
2017-04-19 11:50:01 +02:00
Florian Schmaus
e6a51f2151
Add PubSubManager.getLeafNode() and improve prosody workaround
...
by using the protected constructor and not reflection.
2017-04-19 11:46:39 +02:00
10927577ad
Fix getOrCreateLeafNode for prosody
2017-04-19 11:34:47 +02:00
Florian Schmaus
16ede9806a
Add PubSubManaer.supportsAutomaticNodeCreation()
2017-04-06 12:32:34 +02:00
Florian Schmaus
e73cef8000
Add PubSubManager.tryToPublishAndPossibleAutoCreate(String, I)
2017-04-06 10:14:54 +02:00
Florian Schmaus
8466a5af1a
Improve MUCs subject changed notification filter
...
Filter also messages with bodies or thread element.
2017-04-04 14:27:11 +02:00
Florian Schmaus
a887cde1ce
Allow MUC room subject changes from the MUCs bare JID
...
Fixes SMACK-754.
2017-04-04 14:08:19 +02:00
Florian Schmaus
1e0481b355
Add PubSubManager.getOrCreateLeafNode(String)
2017-03-18 18:31:06 +01:00
Florian Schmaus
0a6843f41f
Make StreamNegotiator weakly reference XMPPConnection
...
by extending Manager.
Because FileTransferNegotiator will hold a strong reference to the
StreamNegotiators, which will eventually prevent XMPPConnection from
being GC'ed if no weak references in StreamNegotiator are used.
Thanks to Werner Glanzer for pointing this out.
2017-03-15 21:17:49 +01:00
Florian Schmaus
a592a12229
Make InBandBytestreamManager use weak references to XMPPConnection
2017-03-15 15:07:41 +01:00
Florian Schmaus
68cecf2eee
Fix the MUC join presence response filter
...
Error responses do not contain the '110' status. Therefore we have to
filter for them via the stanza id and the from address.
2017-02-20 14:22:19 +01:00
Florian Schmaus
6cfdf2bc6f
Use CopyOnWriteArraySet for pingFailedListeners
...
To prevent
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:788)
at java.util.HashMap$KeyIterator.next(HashMap.java:815)
at org.jivesoftware.smackx.ping.PingManager.pingMyServer(PingManager.java:252)
at org.kontalk.service.msgcenter.MessageCenterService$3.run(MessageCenterService.java:1114)
at java.lang.Thread.run(Thread.java:818)
Thanks to Daniele Ricci for reporting this.
2017-02-15 20:16:40 +01: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
ef0af66b21
Enfore spaces for indentation
...
Although I'm in the tabs camp, Smack uses mostly spaces. Therefore it
is the logical choice for the indentation style.
2017-02-07 22:10:10 +01:00
Florian Schmaus
bf1e07e672
Fix chat2.ChatManager's message filter
...
Thanks to Andras Csete for pointing this out.
2017-02-02 12:46:50 +01:00