1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00
Commit graph

5191 commits

Author SHA1 Message Date
Florian Schmaus
95900ea41f [github ci] Use overallsapp/github-action@v2 to report coverage stats 2024-09-26 20:47:03 +02:00
Florian Schmaus
b0f0ee2330 Revert "[build] Downgrade bnd gradle plugin to 6.4.0"
This reverts commit d217c32e72.

Since the new error prone version requires Java 17, we can also use
the bnd gradle plugin version that requires Java 17.
2024-09-26 18:25:45 +02:00
Florian Schmaus
4c7ec625c0 Smack 4.5.0-beta4-SNAPSHOT 2024-09-26 16:30:25 +02:00
Florian Schmaus
9a04224bd6 Smack 4.5.0-beta3 2024-09-26 13:26:14 +02:00
Florian Schmaus
73c935cf95 [gradle] Commit gradle.properties with XML parser workaround 2024-09-26 13:26:14 +02:00
Florian Schmaus
ea8e15d10f
Merge pull request #639 from Flowdalic/ci-revert-java-11
Revert "[ci] Add java 11 to build matrix"
2024-09-25 19:58:21 +00:00
akrherz
8bd88180be Revert "[ci] Add java 11 to build matrix"
This reverts commit 6857ac6b87.

The setup-android@v3 task installing android-21 requires Java 17.
2024-09-25 21:57:05 +02:00
Florian Schmaus
220faa9d3d
Merge pull request #637 from Flowdalic/drop-gradle-plugin
[build] Drop unused freefair maven-plugin
2024-09-25 19:50:24 +00:00
Florian Schmaus
1fffb90783 [build] Drop unused freefair maven-plugin 2024-09-25 21:50:04 +02:00
Florian Schmaus
c5e9e4832d
Merge pull request #635 from akrherz/aqute_version
[build] Downgrade bnd gradle plugin to 6.4.0
2024-09-25 19:35:32 +00:00
akrherz
6857ac6b87
[ci] Add java 11 to build matrix 2024-09-25 14:34:45 -05:00
Florian Schmaus
c4d16a6d6c
Merge pull request #636 from Flowdalic/bump-error-prone
[build] Bump error prone from 2.9.0 to 2.32.0
2024-09-25 19:32:58 +00:00
Florian Schmaus
beacb5eb8e [build] Bump error prone from 2.9.0 to 2.32.0 2024-09-25 21:32:17 +02:00
akrherz
d217c32e72
[build] Downgrade bnd gradle plugin to 6.4.0
7.0.0 requires Java 17
2024-09-25 12:51:02 -05:00
Florian Schmaus
55400633c8
Merge pull request #634 from Flowdalic/rename-java8-to-java11
Rename smack-java8(-full) to smack-java11(-full)
2024-09-25 13:29:59 +00:00
Florian Schmaus
07d9d694da Rename smack-java8(-full) to smack-java11(-full)
To denote that Smack now requires at least Java 11 to run. Fixes
SMACK-953.
2024-09-25 15:28:55 +02:00
Florian Schmaus
5d2ca5d7d3
Merge pull request #633 from Flowdalic/ci-java-21
[github ci] Build also with Java 21
2024-09-25 13:18:39 +00:00
Florian Schmaus
2eddf1949a [github ci] Build also with Java 21 2024-09-25 15:15:04 +02:00
Florian Schmaus
348a3ab091
Merge pull request #630 from guusdk/sint_formtest-smack-4.5.0-beta2
[sint] Fix compatibility with Smack 4.5.0-beta2
2024-09-25 10:59:09 +00:00
Florian Schmaus
f59d7f3257
Merge pull request #632 from Flowdalic/smack-gradle-bump
Bump to Gradle 8.10.2, require Java 11
2024-09-25 10:58:39 +00:00
Florian Schmaus
1e5d34eacf Bump to Gradle 8.10.2, require Java 11
Bump Gradle from 6.8.3 to 8.10.2 and increase the minimum required
Java version from 8 to 11 (SMACK-953).

The switch from Java 8 to 11 caused some Bytecode portability issues
regarding NIO Buffers. Java changed with version 9 the return type of
some subclasses of Buffer to return the specific Buffer type instead
of the Buffer superclass [JDK-4774077]. For example, ByteBuffer.filp()
previously returned Buffer, while it does return ByteBuffer now.

This sensible change was not reflected by the Android API [1], which
means that AnimalSniffer rightfully started to complain that there is
no method "ByteBuffer ByteBuffer.flip()" in Android, there is only
"Buffer ByteBuffer.flip()", and those are incompatible methods on
Java's Bytecode layer.

As workaround, this changes

    return charBuffer.flip().toString();

to

    ((java.nio.Buffer) charBuffer).flip();
    return charBuffer.toString();

to restore the Bytecode portability between Android and Java.

Errorprone also got new checks, of which JavaUtilDate and JdkObsolete
are wroth mentioning.

JavaUtilData basically strongly recommends to use Java's newer time
API over java.util.Date. But since Smack was Java 8 until now,
j.u.Date is widely used.

Similar JdkObsolete mentions obsolete JDK APIs, like data structures
like Vector and Stack. But mostly LinkedList, which should usually be
replaced by ArrayList. And this is what this commit largely does.

JDK-4774077: https://bugs.openjdk.org/browse/JDK-4774077
1: https://issuetracker.google.com/issues/369219141
2024-09-25 12:08:50 +02:00
Guus der Kinderen
e4fcdb6879 [sint] Fix compatibility with Smack 4.5.0-beta2
Due to a change in Smack 4.5.0-beta2, test execution of (all) SINT tests is aborted when `FormTest` is executed.

It appears that Smack now has more strict argument validation when setting thread IDs on message stanzas. This validation should not fail for the tests that are shipped with Smack.

This is the stack trace when executing the failing test (which no longer occurs after the change in this commit is applied):

```
Exception in thread "main" java.lang.IllegalArgumentException: thread must not be null nor empty
	at org.jivesoftware.smack.util.StringUtils.requireNotNullNorEmpty(StringUtils.java:533)
	at org.jivesoftware.smack.packet.Message$Thread.<init>(Message.java:326)
	at org.jivesoftware.smack.packet.MessageBuilder.setThread(MessageBuilder.java:70)
	at org.jivesoftware.smack.packet.MessageBuilder.setThread(MessageBuilder.java:66)
	at org.jivesoftware.smackx.xdata.FormTest.testFilloutForm(FormTest.java:133)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.lambda$runTests$0(SmackIntegrationTestFramework.java:476)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runConcreteTest(SmackIntegrationTestFramework.java:556)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$PreparedTest.run(SmackIntegrationTestFramework.java:764)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runTests(SmackIntegrationTestFramework.java:544)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.run(SmackIntegrationTestFramework.java:277)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.main(SmackIntegrationTestFramework.java:115)
```
2024-09-19 10:51:10 +02:00
Florian Schmaus
d8d066b831 [github ci] Install Android SDK 21 2024-09-16 08:59:04 +02:00
Florian Schmaus
5a822a6631 Smack 4.5.0-beta3-SNAPSHOT 2024-09-15 20:00:57 +02:00
Florian Schmaus
fd1f692031 Smack 4.5.0-beta2 2024-09-15 19:50:40 +02:00
Florian Schmaus
ab16e1a32c Bump jxmpp version to 1.1.0-beta1 2024-09-15 19:45:15 +02:00
Florian Schmaus
8d7952cec3 Bump MiniDNS version to 1.1.0-alpha3 2024-09-15 19:44:46 +02:00
Florian Schmaus
1c1f57d9ff [core] Refine javadoc for ConnectionConfiguration.getLanguage() 2024-09-15 19:10:14 +02:00
Florian Schmaus
49379afd3f [core] Correctly handle BCP 42 language tag creation from Locale for xml:lang
Fixes SMACK-952
2024-09-15 19:09:45 +02:00
Florian Schmaus
94375e3208 Bump minimum Android SDK version to 21
Fixes SMACK-951
2024-09-15 19:09:19 +02:00
Florian Schmaus
b1071412e2 Smack 4.5.0-beta2-SNAPSHOT 2024-09-14 21:46:55 +02:00
Florian Schmaus
822115e9f6 Smack 4.5.0-beta1 2024-09-14 21:35:33 +02:00
Florian Schmaus
4a101e2c99 Delete APIs scheduled for removal with Smack 4.5 2024-09-14 21:34:47 +02:00
Florian Schmaus
af77e561c5
Merge pull request #618 from stokito/account_registration
[core] Make AccountManager.getRegistrationInfo() public
2024-09-14 10:10:57 +00:00
Florian Schmaus
300106edb5
Merge pull request #627 from Flowdalic/muc-bare-jid
[muc] Use BareJid for affiliation changes
2024-09-14 10:07:04 +00:00
Florian Schmaus
6f0499b7f7 [muc] Use BareJid for affiliation changes
As per XEP-0045 § 5.2 "Affiliations are granted, revoked, and
maintained based on the user's bare JID, not the nick as with roles."

Fixes SMACK-948
2024-09-12 14:38:23 +02:00
Florian Schmaus
63e25bc8cd
Merge pull request #624 from guusdk/SMACK-949_MUC-join-state-after-destroy
[muc] State of MUC should reflect room destruction
2024-09-12 11:41:59 +00:00
Florian Schmaus
5633d0e6c2
Merge pull request #623 from hamed-sb/master
[core] fix toXml for UnparsedIQ
2024-09-12 11:32:28 +00:00
Florian Schmaus
3dfd90dc34
Merge pull request #622 from guusdk/sint-rosterutil-errormessage
[sinttest] Add error message to subscribe request failure
2024-09-12 11:31:07 +00:00
Florian Schmaus
7024151f5d
Merge pull request #612 from stokito/fix_gradle_plugins
Fix gradle plugins
2024-09-12 11:24:32 +00:00
Florian Schmaus
fc2f258310
Merge pull request #625 from guusdk/typo-2
Fixes spelling (includes one API change)
2024-09-12 11:02:45 +00:00
Florian Schmaus
b44ade562a Merge branch '4.4' 2024-09-12 13:02:16 +02:00
Florian Schmaus
3bb07521bb
Merge pull request #626 from Flowdalic/github-ci-upload-artifacts-v4
[github ci] Bump upload-artifact to v4
2024-09-12 13:01:55 +02:00
Florian Schmaus
b034e614d4 [github ci] Bump upload-artifact to v4 2024-09-12 11:53:56 +02:00
Guus der Kinderen
c85bcadd81 Fixes spelling (includes one API change)
Mostly benign changes. Added one new method to replace a method with a spelling mistake in its name. Kept the old method, marked as 'deprecated'.
2024-09-11 20:03:43 +02:00
Guus der Kinderen
93efdf3eda [muc] State of MUC should reflect room destruction
After a room is destroyed, the MultiUserChat-stored representation of the 'join' state of any occupant should be updated to reflect that the user is no longer in the room.

This fixes a problem where an occupant (that not itself triggered the destruction) appears to continue be part of a room after its destruction.

Additional integration test assertions are added to check for the invalid state fixed by this commit.

fixes SMACK-949
2024-09-05 15:12:28 +02:00
hamed-sb
609781b5ad [core] fix toXml for UnparsedIQ 2024-09-05 12:50:57 +03:30
Guus der Kinderen
4f840d1066 [sinttest] Add error message to subscribe request failure
Have a descriptive error message when a subscription request times out.
2024-09-05 10:59:23 +02:00
Florian Schmaus
38c6dd21b4
Merge pull request #621 from Flowdalic/fillable-forms-only-require-list-fields-to-have-value-set
[xdata] Only require list-multi and list-single fields to have a value
2024-09-02 18:56:02 +00:00
Florian Schmaus
4d790aa7db [xdata] Only require list-multi and list-single fields to have a value
Only list-multi and list-single fields require at least one value when
submitting a form. In other cases, for example XEP-0045's
muc#roomconfig_roomadmins, which is of type jid-multi, is used without
any values to reset the room's admins list.

Fixes SMACK-946.
2024-09-01 21:56:24 +02:00