1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-01 01:35:59 +01:00
Commit graph

4764 commits

Author SHA1 Message Date
Florian Schmaus
4e90db3191 [gitlab-ci] Also check with Java 15 2021-02-15 13:12:24 +01:00
Florian Schmaus
8b0248c346 Bump Mockito to 3.7.7 2021-02-15 13:12:24 +01:00
Florian Schmaus
4aacdc5154 Add smack-websocket-java11
This also lifts a bunch of logic from smack-websocket-okhttp into
smack-websocket. Furthermore, the following subprojects require now
Java 11:
- smack-integration-test
- smack-omemo-signal-integration-test
- smack-repl
- smack-websocket-java11

Related tracking issue: SMACK-835
2021-02-14 20:34:40 +01:00
Florian Schmaus
cd40455b62 [smack-integration-test] Bump reflections to 0.9.12
This also means that smack-integration-test needs to declare a
dependency on Guava, which was previously available as transitive
dependency of 'reflections' 0.9.11.
2021-02-14 18:37:44 +01:00
Florian Schmaus
fe3214291d Bump Bouncy Castle to 1.68 2021-02-14 18:35:50 +01:00
Florian Schmaus
9261d6485e [openpgp] Do not put the BouncyCastleProvider at first position
This causes

java.security.InvalidKeyException: cannot identify XDH private key

on Java 11 or higher.

See also
- https://github.com/bcgit/bc-java/issues/620
- https://github.com/bcgit/bc-java/issues/589
- https://github.com/corretto/corretto-11/issues/168
- https://bugs.openjdk.java.net/browse/JDK-8171279
2021-02-14 18:35:49 +01:00
Florian Schmaus
ce4f85acf8
Merge pull request #459 from Flowdalic/reported-data
[DataFormProvider] Retrieve field types from <reported/> if possible
2021-02-01 16:04:48 +01:00
Florian Schmaus
bda3901910 Deprecate DataForm.Builder.setType() 2021-01-29 20:40:05 +01:00
Florian Schmaus
070aa8e28e [DataFormProvider] Retrieve field types from <reported/> if possible
Fixes SMACK-902.
2021-01-29 20:40:05 +01:00
Florian Schmaus
86b48fbf00
Merge pull request #458 from Flowdalic/errorprone
Bump ErrorProne to 2.5.1 and refactor Providers a bit
2021-01-29 09:45:24 +01:00
Florian Schmaus
a7b3303f3e Bump ErrorProne to 2.5.1 and refactor Providers a bit
This also resulted in a refactoring of the Providers and parsing
Exceptions. NumberFormatException and ParseException can now be thrown
directly, the wrapping in a SmackParsingException is down at a higher
layer, i.e. in AbstractProvider.
2021-01-29 09:26:15 +01:00
Aditya Borikar
1df0763f92 Remove AbstractWebsocketNonza since it is no longer needed 2021-01-25 20:31:51 +01:00
Florian Schmaus
c5a546554b Rework WebSocket code
Related to SMACK-835.
2021-01-25 19:56:54 +01:00
Florian Schmaus
0c013e4f29 Merge branch '4.4' 2021-01-25 19:48:16 +01:00
Florian Schmaus
9ab50c374d [extensions] Use StanzaView as parameter type in BoBDataExtension.from()
BoBDataExtensions can also appear in IQs (Registration IQ), and
potentially also Presence stanzas.

Fixes SMACK-901.
2021-01-25 14:29:21 +01:00
Florian Schmaus
84d73e9623 [core] Fix XmlEnvironment namespace: Use default namespace (not element's)
Assume the element
<foo:bar xmlns='namespace' xmlns:foo='foo-namespace'/>

then the <bar/> element's namespace is 'foo-namespace', but the
default namespace is 'namespace'. And this is the namespace that
scopes into inner elements.
2021-01-25 14:24:55 +01:00
Florian Schmaus
ec80ab4a20
Merge pull request #456 from Flowdalic/coveralls
[gradle] Bump coveralls-gradle-plugin to 2.10.2
2021-01-12 16:04:22 +01:00
Florian Schmaus
9fb4a2bf4f [gradle] Bump coveralls-gradle-plugin to 2.10.2
This should make it work with Github Actions.
2021-01-12 13:13:16 +01:00
Florian Schmaus
ec2ef1facc
Merge pull request #455 from Flowdalic/fix-data-form-npe
[xdata] Fix NPE in DataForm.Builder.addItem()
2021-01-12 12:31:17 +01:00
Florian Schmaus
d64a9d9029 [xdata] Fix NPE in DataForm.Builder.addItem()
Fixes SMACK-900.
2021-01-12 09:41:46 +01:00
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