1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +01:00
Commit graph

3991 commits

Author SHA1 Message Date
Florian Schmaus
ca7529c192 Use Integer.compare(int, int) now that we are on Android 19 2019-08-04 23:03:42 +02:00
Florian Schmaus
3e74d11b45 Disable MucMemoryLeakTest
Although it it not that unreliable, it causes false negatives once in
a while. This is because the standard Java SE API does not provide a
way to force a *full* garbage collection run, we need to resort to
unreliable hacks to trigger one.

The test itself is still useful to diagnose or refute alleged memory
leaks.

This commit also move the test from JUnit 4 to Junit 5.
2019-08-03 22:25:21 +02:00
Florian Schmaus
efb206f7bd Use Locale.getDefault() to initialize the language 2019-08-03 22:20:05 +02:00
Georg Lukas
6a0e0f0f67 Implement xml:lang support in ConnectionConfiguration and AbstractXMPPConnection
This patch makes it possible to change the stream-level language as part
of the connection configuration, to allow a properly implemented
entities to provide i18n'ed response messages. The Locale type is used
for this configuration, and the effective language string can be
obtained via `ConnectionConfiguration.getXmlLang()`.

This code does not cover XMPPBOSHConnection!

Signed-off-by: Georg Lukas <georg@op-co.de>
2019-08-03 22:19:45 +02:00
Florian Schmaus
12cbeede57 Use Enum.toString() in XmlStringBuilder.element(String, Enum)
as toString() is often overriden by Enums to yield the expected XMPP
wire protocol representation.
2019-08-03 22:15:44 +02:00
Florian Schmaus
eecd5b70d3 Merge branch 'master' of github.com:igniterealtime/Smack 2019-07-30 11:35:45 +02:00
Florian Schmaus
8da954f7a4 OpenPGP: Bump Pgpainless to 0.0.1-alpha7
Also unify how new Security Providers are installed.

Thanks to Paul Schaub for helping with this.
2019-07-30 09:37:19 +02:00
Florian Schmaus
96e14471d0
Merge pull request #324 from adiaholic/spellcorrection
Correcting mini typing error
2019-07-28 18:11:56 +02:00
Florian Schmaus
d2f9617418
Merge pull request #326 from adiaholic/bugFix
Return obtained XmlStringBuilder instead of null
2019-07-28 17:50:09 +02:00
adiaholic
41a3ec05c7 Returning obtained XmlStringBuilder instead of null 2019-07-28 16:36:12 +05:30
Florian Schmaus
b86d088926 Bump BouncyCastle to 1.62 2019-07-27 12:38:24 +02:00
Florian Schmaus
4ca2c7cc69 Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks 2019-07-24 09:18:39 +02:00
Florian Schmaus
2ac452fe1e travis: Use apt addon to install graphviz 2019-07-22 08:47:37 +02:00
Florian Schmaus
95c73f51b1 Bump Checkstyle to 8.22 2019-07-22 08:40:17 +02:00
Florian Schmaus
9de2b983c8 gradle: Add workaround for gpg signatory not supporting 'required' 2019-07-21 09:16:00 +02:00
Florian Schmaus
4e34f221d8 Smack 4.4.0-alpha3-SNAPSHOT 2019-07-21 08:05:52 +02:00
Florian Schmaus
acefc9d324 Smack 4.4.0-alpha2 2019-07-20 22:34:23 +02:00
Florian Schmaus
5ba85aa8a7 gradle: Use gpg-agent for signing 2019-07-20 22:34:23 +02:00
Florian Schmaus
2da2633b0f travis: Update cache configuration 2019-07-20 10:26:49 +02:00
Florian Schmaus
ce0ddcf69c travis: Remove "sudo: false" as recommended by travis 2019-07-20 10:26:49 +02:00
Florian Schmaus
8c69048be3 travis: Update the Ubuntu repositories 2019-07-20 10:26:49 +02:00
Florian Schmaus
fcb95bf549 travis: Remove openjdk8, add openjdk(9|11) 2019-07-20 10:26:35 +02:00
Florian Schmaus
cd0cb95ce1 checkstyle: Use $config_loc for Java 11
Also move configuration files into "${rootProject}/config/checkstyle"
to follow convention over configuration.

See https://github.com/gradle/gradle/issues/8286#issuecomment-458145619
2019-07-20 10:26:32 +02:00
Florian Schmaus
947244b704 Use XMLInputFactory.newInstance() instead of newFactory()
As newFactory() is errornously marked as deprecated in Java 9 or
higher. See also https://bugs.openjdk.java.net/browse/JDK-8183519
2019-07-19 23:05:46 +02:00
Florian Schmaus
91ec6cc955 Javadoc changes for Java 11 compatibility 2019-07-19 23:05:46 +02:00
Florian Schmaus
8fa90113c9 Remove finalize() from AbstractXmppNioConnection 2019-07-19 23:05:46 +02:00
Florian Schmaus
ce57c952ce travis: Use Ubuntu 14.04 (Trusty) 2019-07-19 23:05:19 +02:00
Florian Schmaus
346a86dae0 travis: Use apt-get instead apt
It appears 'apt' is no longer available and the official documentation
only mentions apt-get.
2019-07-19 14:52:15 +02:00
Florian Schmaus
68e14bd897 travis: Also call 'install' target
to check if artifact creation is functional.
2019-07-19 14:23:53 +02:00
Florian Schmaus
ca9fb36d09 travis: Use gradle 5.5.1 2019-07-19 14:16:19 +02:00
Florian Schmaus
90cbcaebc7 smack-android/build.gradle: Use 'implementation' for smack-xmlparser-xpp3
which is the probably the better choice here anyway. And it also
prevents the following failure on POM creation:

$ gradle uploadArchives
> Task :smack-android:uploadArchives FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':smack-android:uploadArchives'.
> Could not publish configuration 'archives'
   > Could not write to file
   '/home/flo/data/code/smack/smack-android/build/poms/pom-default.xml'.

See also

https://discuss.gradle.org/t/gradle-fails-to-create-pom-with-the-configuration-to-scope-mapping-is-not-unique/32087
2019-07-19 14:13:49 +02:00
adiaholic
fe85ab3b83 Correcting mini typing error 2019-07-09 22:12:26 +05:30
Florian Schmaus
658905e1ba Do not check exception message in PacketParserUtilsTest
as it may be localized.

This also makes PacketParserUtilsTest to use Junit5.

Fixes SMACK-874.
2019-07-05 17:40:45 +02:00
Florian Schmaus
fda9408cf3 Use XmlStringBuilder in PubSub's SubscribeExtension 2019-07-05 11:31:12 +02:00
Florian Schmaus
9c0da3ed07 Change SubscribeExtension's jid field type from String to Jid
and make it final.
2019-07-05 11:24:02 +02:00
Florian Schmaus
89b64fbf0c Add TODO comment to XmppNioTcpConnection 2019-07-05 09:17:14 +02:00
Florian Schmaus
60c7e0ab76 Fix typo in XmppNioTcpConnection: s/Therfore/Therefore/ 2019-07-05 09:17:14 +02:00
Florian Schmaus
178ae8abef Merge branch 'master' of github.com:igniterealtime/Smack 2019-07-04 16:57:07 +02:00
Florian Schmaus
aec648c34b Improve PubSubIntegrationTest
Ensuring that the node has no items in
transientNotificationOnlyNodeWithoutItemTest() is not right. An
implementation is free to create an item with an ID and return it. The
item is just not guaranteed to be persistent.

Also add a dummy payload to
transientNotificationOnlyNodeWithItemTest().
2019-07-04 16:48:35 +02:00
Florian Schmaus
df5899e72b Introduce SmackConfiguration.SMACK_URL(_STRING) 2019-07-04 15:51:28 +02:00
Florian Schmaus
f3b856c80b Improve shouldFailIfInitiatorCannotConnectToSocks5Proxy() unit test
If run in parallel with other unit tests, especially onces that open
up a proxy, this test could fail, because another unit test actually
had an proxy running on the very address this unit test assumes to be
no proxy running.

We now use an IP address from RFC 5737's TEST-NET-1 address block,
which should never be available.
2019-07-04 15:49:47 +02:00
Florian Schmaus
1b5a264d52 Add assert to IQ.initializeAsResultFor(IQ)
This method is not meant to be used to be invoked with the identity.
2019-07-04 15:48:07 +02:00
Florian Schmaus
870e6c674a Make ExceptionUtil.getStackTrace(Throwable) null safe 2019-07-04 15:47:46 +02:00
Florian Schmaus
d9f45e03f3
Merge pull request #323 from vanitasvitae/color_update
Update Consistent Color Generation to 0.6.0
2019-07-03 23:34:32 +02:00
9072b78c76
Update XEP-0392 to 0.6.0 2019-06-30 16:01:08 +02:00
18740d906f
Add local.properties to gitignore 2019-06-30 16:00:31 +02:00
Florian Schmaus
01289e9682 Add support for XEP-0315: Data Forms XML Element
Fixes SMACK-872.
2019-06-12 22:32:24 +02:00
Florian Schmaus
a3f6fa65a4 Disallow null or empty string in PubSubManager.getNode(String) 2019-06-12 22:31:55 +02:00
Florian Schmaus
ef88bb17d0 Disallow empty string as node in DiscoverInfo 2019-06-12 22:31:29 +02:00
Florian Schmaus
e3ec422071 Try to lookup QNAME first in XmppElementUtil.getQNameFor() 2019-06-12 22:30:56 +02:00