Commit Graph

4544 Commits

Author SHA1 Message Date
Florian Schmaus 1bfb9f34f1 Merge branch '4.4' 2021-01-12 09:22:42 +01:00
Florian Schmaus 9d734c4a3e
Merge pull request #454 from Flowdalic/readme-build-status-github-actions
[README] Switch "build status" badge from Travis to Github Actions
2021-01-12 09:21:54 +01:00
Florian Schmaus 3a661d71b9
Merge pull request #453 from Flowdalic/fix-caps-npe
[caps] Check for null in EntityCapsManager.addCapsExtension()
2021-01-12 09:12:16 +01:00
Florian Schmaus 8cc4ba0a42 [README] Switch "build status" badge from Travis to Github Actions
This also renames the CI workflow from "Smack CI" to just "CI".
2021-01-12 09:08:34 +01:00
Florian Schmaus df3ca4100b [caps] Check for null in EntityCapsManager.addCapsExtension()
To avoid a NPE, we check for null in addCapsExtension.

Fixes SMACK-899.
2021-01-12 09:01:19 +01:00
Florian Schmaus c431d84154 Merge branch '4.4' 2021-01-10 20:45:32 +01:00
Florian Schmaus 938a4271f3
Merge pull request #452 from Flowdalic/abstract-provider-element-type
[core] AbstractProvider should also consider TypeVariable
2021-01-10 20:45:12 +01:00
Florian Schmaus 6eda93228f [core] AbstractProvider should also consider TypeVariable
aTalk shows the following exception:

2020-12-14 12:11:13.704 7370-30976/org.atalk.android E/AndroidRuntime: FATAL EXCEPTION: AccountManager.loadStoredAccounts
    Process: org.atalk.android, PID: 7370
    java.lang.AssertionError: Element type 'EE' is neither of type Class or ParameterizedType
        at org.jivesoftware.smack.provider.AbstractProvider.<init>(AbstractProvider.java:46)
        at org.jivesoftware.smack.provider.Provider.<init>(Provider.java:40)
        at org.jivesoftware.smack.provider.ExtensionElementProvider.<init>(ExtensionElementProvider.java:29)
        at org.xmpp.extensions.DefaultExtensionElementProvider.<init>(DefaultExtensionElementProvider.java:43)
        at org.xmpp.extensions.coin.CoinIQProvider.<init>(CoinIQProvider.java:46)
        at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.initialize(ProtocolProviderServiceJabberImpl.java:2091)
        at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderFactoryJabberImpl.createService(ProtocolProviderFactoryJabberImpl.java:121)
        at net.java.sip.communicator.service.protocol.ProtocolProviderFactory.loadAccount(ProtocolProviderFactory.java:934)
        at net.java.sip.communicator.service.protocol.AccountManager.doLoadStoredAccounts(AccountManager.java:139)
        at net.java.sip.communicator.service.protocol.AccountManager.loadStoredAccounts(AccountManager.java:294)
        at net.java.sip.communicator.service.protocol.AccountManager.runInLoadStoredAccountsThread(AccountManager.java:394)
        at net.java.sip.communicator.service.protocol.AccountManager.access$000(AccountManager.java:36)
        at
		net.java.sip.communicator.service.protocol.AccountManager$1.run(AccountManager.java:329)

where CoinIQProvider line 46-47 [1] reads

    private final DefaultExtensionElementProvider<URIsExtension> urisProvider
            = new
			DefaultExtensionElementProvider<>(URIsExtension.class);

This fixes SMACK-898.

1: f61f264312/aTalk/src/main/java/org/xmpp/extensions/coin/CoinIQProvider.java (L47)
2021-01-10 20:37:01 +01:00
Florian Schmaus 1d5949de4d
Merge pull request #451 from Flowdalic/github-actions
Add GitHub CI actions
2021-01-10 20:36:29 +01:00
Dan Caseley 5b73f2c061 Add Github Actions CI workflow, drop Travis CI
Modified-by: Florian Schmaus <flo@geekplace.eu>
2021-01-10 20:28:34 +01:00
Florian Schmaus 35a71f0131 Merge branch '4.4' 2021-01-06 13:51:38 +01:00
Florian Schmaus 65d7c1c1b8 [im] Update DirectoryRosterStore TODO note regarding Android API 26. 2021-01-06 13:48:49 +01:00
Florian Schmaus 40aa9e87b7 [im] DirectoryRosterStore.readEntry() should also catch IllegalArgumentException
Fixes SMACK-897.
2021-01-06 13:48:03 +01:00
Florian Schmaus d64ee785bd [extensions] Add BoBDataExtension getBobData() and getContentId()
Those two methods where missing after the BoB API redesign.

Fixes SMACK-896.
2021-01-06 13:47:09 +01:00
Florian Schmaus fcc372754e Fix NPE in BoBIQ by adding XmlStringBuilder.optIntAttribute(String, Integer)
The method was missing and hence BoBIQ used optIntAttribute(String,
int) instead, which resulted in an NPE if the Integer was null.

Fixes SMACK-895.
2021-01-06 13:45:13 +01:00
Florian Schmaus d8642847ea Smack 4.4.0
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAl/Msl5fFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFIq8gf9GZp0Cl9Gr+seA/C8nczE/cNRKfHnDR224klbjlGrnojb+bL2QgeKG6wN
 u/eL3+UMus8uw3+R8NKARawqt/r6mbk4bgdGEbzoByLO6iiPYTr7TuZmTOQyZa5L
 tMNkFIvfvMzDeDDqI4z4uTgT3s7YBg0d4BT7cL8T6RaZGHF57OxqhWnKxMuaiTXH
 HJzVTPrtAcYg17QZl5+mrhiWyynE5+4QGeluYHlh7vvsniwNOqrwO1vWHg2BX003
 DjaHK+6oLjKxVljCklXxE7Wsx0VcMrBfv2qZwW3Q4ZzZVcrAn8TC4HrUtR8DL176
 DpGlEhmmdr3xKKX0JQ9RmIod+xSabw==
 =4wGX
 -----END PGP SIGNATURE-----

Merge tag '4.4.0'

Smack 4.4.0
2020-12-06 12:16:44 +01:00
Florian Schmaus ca3679add9 Smack 4.4.1-SNAPSHOT 2020-12-06 12:15:19 +01:00
Florian Schmaus d8864b62ca Smack 4.4.0 2020-12-06 11:28:41 +01:00
Florian Schmaus a4bb5bfda8 [ibb] Use UInt16 for 'seq' and fix its handling
Fixes a off-by-one error when incrementing 'seq'. Thanks to Kim
Alvefur <zash@zash.se> for spotting this.
2020-12-05 23:04:17 +01:00
Florian Schmaus 1a963cc794 Merge branch '4.4' 2020-11-25 20:57:44 +01:00
Florian Schmaus 02c9058c3d [core] Remove @SuppressWarnings for parseContentDepthWithRoundtrip()
Also use the most specific return type in the method's signature.
2020-11-25 20:55:05 +01:00
Florian Schmaus ca497a2199 [core] Fix parseContentDepthWithRoundtrip() and add tests 2020-11-25 20:55:05 +01:00
Florian Schmaus 821bdf6d86 Smack 4.4.0-rc3-SNAPSHOT 2020-11-18 21:19:01 +01:00
Florian Schmaus c1f3f8ce13 Smack 4.4.0-rc2 2020-11-18 20:04:55 +01:00
Florian Schmaus a2636b2f60 Merge branch '4.4' 2020-11-14 15:33:42 +01:00
Florian Schmaus f10cbb4a97 [core] Add requireNonNull() check to some connection endpoints 2020-11-14 12:47:35 +01:00
Florian Schmaus c4228e072b [tcp] Add missing null check in resolveDomain()
The method lookupHostAddress() returns null in case of an error, hence
we need to test if the returned value is null prior adding the endpoint.

Should fix the following NPE:

java.lang.NullPointerException:
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration (XMPPTCPConnection.java:606)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal (XMPPTCPConnection.java:846)
  at org.jivesoftware.smack.AbstractXMPPConnection.connect (AbstractXMPPConnection.java:530)
  at org.jivesoftware.smack.ReconnectionManager$2.run (ReconnectionManager.java:282)
  at java.lang.Thread.run (Thread.java:784)

Reported-by: Eng ChongMeng <cmeng.gm@gmail.com>
2020-11-14 12:47:34 +01:00
Florian Schmaus 3f3a7cb540 Merge branch '4.4' 2020-11-09 21:23:25 +01:00
Guus der Kinderen 59cf449799 Provide more detailed code comment. 2020-11-09 21:21:27 +01:00
Guus der Kinderen 0ff8040895 FileTransfer: replace Error.none with null
This fixes an inconsistent representation of a 'no error' representation, that
causes a file transfer in which not enough bytes were transferred to _not_ be
marked as having a problem.
2020-11-09 21:21:27 +01:00
Florian Schmaus 5522d6681e [README] Update contact information 2020-11-09 12:26:51 +01:00
Florian Schmaus 68f400616d [README] Update URL for Nightly Unique Maven Snapshots 2020-11-09 12:21:24 +01:00
Florian Schmaus 71f5cfe3da Merge branch '4.4' 2020-11-09 11:08:47 +01:00
Florian Schmaus e117f431bc Smack 4.4.0-rc2-SNAPSHOT 2020-11-09 09:32:29 +01:00
Florian Schmaus e6236b0c21 Smack 4.4.0-rc1 2020-11-09 08:54:18 +01:00
Florian Schmaus afd18f95c9 Add Smack.getNoticeStream() and 'License' section to README 2020-11-09 08:46:57 +01:00
Florian Schmaus 1f5ada4822 Add org.jivesoftware.smack.Smack with getVersion() and ensureInitialized() 2020-11-09 08:46:57 +01:00
Florian Schmaus df96c57093 [address] Get rid of PacketCopy workaround
PacketCopy subclassing Stanza was always a peculiarity. The only
subclasses of Stanza should be Message, Presence, and IQ.
2020-11-09 08:46:56 +01:00
Florian Schmaus 72acd8e095 [core] Add StanzaBuilder.build() 2020-11-09 08:46:56 +01:00
Florian Schmaus 7e311ab9df [muc] Prevent race condition on enter() by waiting
This prevents a race condition of enter() with the presence listern by
waiting until all presences have been processed.

Reported-by: Guus der Kinderen <guus@goodbytes.nl>
2020-11-09 08:46:56 +01:00
Florian Schmaus f12fe2264a [muc] Only retrieve MUCUser once in Presence listener 2020-11-08 19:37:41 +01:00
Florian Schmaus 5dfed2935f Add NOTICE file 2020-11-05 12:54:54 +01:00
Florian Schmaus e1624e1ab9 Add resources/get-contributors.sh 2020-11-05 12:52:22 +01:00
Florian Schmaus 74adcda23d Add .mailmap 2020-11-05 12:52:17 +01:00
Florian Schmaus cfccc78ba0 [muc] Rename local variable 'presence' to 'reflectedSelfPresence'
To increase readability, and with that maintainability, we rename
'presence' to 'reflectedSelfPresence' in MultiUserChat.enter(), to
make it clear what kind of presence this variable holds.

Also mark the variable as final.
2020-11-03 22:31:22 +01:00
Florian Schmaus 5f66685949
Merge pull request #436 from guusdk/sint-use-specific-assertions
In tests, use specific assertion implementation
2020-10-27 11:57:21 +01:00
Guus der Kinderen a809f181f5 In tests, use specific assertion implementation
These generate more helpful error messages when assertions fail and
help to show intent.
2020-10-27 11:30:44 +01:00
Florian Schmaus b7a235f43c
Merge pull request #435 from guusdk/sint-cli-output-fix
Add missing right parenthesis in SINT output
2020-10-27 11:14:18 +01:00
Guus der Kinderen 55d7b9d4eb Fix pubsub options rendering
The exiting code generates an unintentional nested 'options' child element:

```
<iq to='pubsub.example.org' id='FQTHU-126' type='get'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <options node='sinttest-multisubscribe-nodename-13pnc'>
      <options jid='smack-inttest-two-13pnc@example.org'
               node='sinttest-multisubscribe-nodename-13pnc'/>
    </options>
  </pubsub>
</iq>
```

This commit removes the undesired nesting, resulting in:

```
<iq to='pubsub.example.org' id='FQTHU-126' type='get'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <options jid='smack-inttest-two-13pnc@example.org'
             node='sinttest-multisubscribe-nodename-13pnc'/>
  </pubsub>
</iq>
```
2020-10-27 10:23:17 +01:00
Paul Schaub 1a9ac238e8 OpenPgpManager: Expose methods to generate and import keys 2020-10-27 10:22:46 +01:00