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

4330 commits

Author SHA1 Message Date
Florian Schmaus
4beaae7d6a disco: avoid boxing to Integer when not necessary 2020-03-13 16:41:27 +01:00
Florian Schmaus
39a833166a Add workaround for truststores in JKS format when using Java >= 9 2020-03-13 16:40:46 +01:00
Florian Schmaus
863d0bf403 Fix NPE in ServiceDiscoveryManager 2020-03-09 14:41:52 +01:00
Florian Schmaus
00dd77b346 Try to guess the default truststore and path
Tested with OpenJDK 8 and 11. The 'JKS' fallback is for OpenJDK 11.
2020-03-09 13:39:19 +01:00
Florian Schmaus
6440f322fe Ensure a X509TrustManager is set 2020-03-09 10:12:43 +01:00
Florian Schmaus
9a081e621d gradle: use compileClasspath instead of compileOnly
In the previous commit 46ddf071b ("gradle: add Android jar to
smack-android-extensions compile classpath") we already added the
Android jar using compileClasspath to smack-android-extensions. Now
use the same configuration for smack-android, since compileOnly is
deprecated.
2020-03-07 20:13:05 +01:00
Florian Schmaus
7b002ea214 gradle: add Android jar to smack-android-extensions compile classpath 2020-03-07 20:13:05 +01:00
Florian Schmaus
f7eaa3cc9e gradle: smack-omemo(-signal) add description, remove plugins
As those plugins are already configured by the projects root
build.gradle file, there is no need to apply them again.
2020-03-07 20:13:05 +01:00
Florian Schmaus
650deda752 gradle: remove unnecessary repositories{} from smack-openpgp/build.gradle
The MavenCentral repository is already configured by the projects root
build.gradle file. No need to do it again in the subproject.
2020-03-07 20:12:18 +01:00
Florian Schmaus
16e438a108 Merge branch 'master' of github.com:igniterealtime/Smack 2020-02-23 19:22:38 +01:00
Florian Schmaus
3adb6c290a travis: use gradle 6.2 2020-02-23 19:12:54 +01:00
Florian Schmaus
78be8f3a04 junit: bump to 5.6.0 2020-02-23 19:12:54 +01:00
Florian Schmaus
961e56a47c proxy: modernize code by using (ByteArrayOutput|DataInput)Stream 2020-02-23 19:12:54 +01:00
Florian Schmaus
b6ad737aa4 proxy: do not call setTcpNoDelay() but instead flush the stream 2020-02-23 19:12:54 +01:00
Florian Schmaus
be2fc23f41 proxy: make it the caller's reponsibility to close the socket
This makes the code shorter as there is now a single place where the
socket should be closed.
2020-02-23 19:12:54 +01:00
Florian Schmaus
22d64ebe6b Merge remote-tracking branch 'my/master' 2020-02-23 16:59:50 +01:00
Florian Schmaus
7b5186f651
Merge pull request #353 from vanitasvitae/androidApiExceptionWording
build.gradle: Improve android API exception message
2020-02-20 15:23:13 +01:00
Florian Schmaus
80e9bcf496
Merge pull request #361 from adiaholic/bugFix
Correct ALPHABET in `BASE32.java`
2020-02-20 15:22:48 +01:00
Florian Schmaus
4a6f49e414
Merge pull request #362 from Flowdalic/errorprone-1.1.1
Errorprone Plugin 1.1.1
2020-02-20 14:44:56 +01:00
Florian Schmaus
876aba9866
Merge pull request #365 from vanitasvitae/iv12
OMEMO: Switch to sending 12 byte IV
2020-02-20 14:44:34 +01:00
5ed594fe73
Prevent multi-instancing of OfflineMessageManager 2020-02-17 01:43:40 +01:00
1051cd2640
OMEMO: Switch to sending 12 byte IV 2020-02-16 22:15:56 +01:00
Florian Schmaus
6edbe640cb gradle: bump errorprone plugin to 1.1.1 2020-01-28 17:44:39 +01:00
adiaholic
ee3d25751d Correct ALPHABET in BASE32.java 2020-01-28 20:19:42 +05:30
e81c4814ed
Make use of XmlStringBuilder in AttentionElement 2020-01-06 18:41:30 +01:00
5fd638545d
build.gradle: Improve android API exception message 2019-12-13 16:12:18 +01:00
Florian Schmaus
a6e2523648 proxy: modernize code by using (ByteArrayOutput|DataInput)Stream 2019-11-18 21:09:11 +01:00
Florian Schmaus
14cc0c1e41 proxy: do not call setTcpNoDelay() but instead flush the stream 2019-11-18 19:45:52 +01:00
Florian Schmaus
7afd1fdf46 proxy: make it the caller's reponsibility to close the socket
This makes the code shorter as there is now a single place where the
socket should be closed.
2019-11-18 19:45:25 +01:00
Florian Schmaus
9d626bf787 core: improve AsyncButOrdered
Instead of marking the handle as not running by setting the handler's
value in the map to false, we now remove simply the key if there is no
handler running. This also means we no longer need to use a weak hash
map for this.

Also reduce the size of the synchronized blocks, mainly by scheduling
the handler outside of the synchronized(threadActiveMap) block.

Make some code better readable and add some more comments. Also do
start a new handler thread if the task threw.
2019-11-08 10:14:21 +01:00
Florian Schmaus
a7a298c5d8 Use standard stanza listeners in MultiUserChat
Those, relatively new, listeners guarantee that the individual
listeners are not invoked in concurrently while preserving the
order. Exactly what MultiUserChat previously did with AsyncButOrdered,
which is now no longer needed and hence can be removed.
2019-11-07 14:36:50 +01:00
Florian Schmaus
eb4c2c5572 s/occured/occurred/ 2019-10-30 12:02:36 +01:00
Florian Schmaus
b0277d7e74 Emit <starttls/> as empty element when possible 2019-10-30 12:00:20 +01:00
Florian Schmaus
2915101843 Use isEmpty() in StringUtils.requireNullOrNotEmpty() 2019-10-30 11:56:55 +01:00
Florian Schmaus
6d1252755b Mark more methods in Stanza as final 2019-10-30 09:23:01 +01:00
Florian Schmaus
ee699f24dd Remove DiscoverInfo.Identity(Identity) copy constructor
as there is no need to copy an immutable type.
2019-10-30 08:24:13 +01:00
Florian Schmaus
63a4212f7e Remove clone() from DiscoverInfo.Identity
there is no need to clone immutable types.
2019-10-30 08:22:47 +01:00
Florian Schmaus
63ba524758 Make IQ(IQ) constructor protected 2019-10-30 08:20:25 +01:00
Florian Schmaus
e2223254cf Organize imports everywhere 2019-10-29 21:12:22 +01:00
Florian Schmaus
69767e9538 Rename AbstractIqBuilder subclasses to their designated names 2019-10-29 19:34:18 +01:00
Florian Schmaus
6e32305987 Apply builder pattern to DiscoverInfo
This is the first transformation of an IQ type to the builder type.
2019-10-29 11:14:55 +01:00
Florian Schmaus
36072fb25a test: created mocked connectionwith stanza factory 2019-10-29 10:40:41 +01:00
Florian Schmaus
4b01892129 Remove unused DiscoverInfo instances in PingTest 2019-10-27 07:51:25 +01:00
Florian Schmaus
e2d206e741 Introduce XMPPConnection.add(Message|Presence)Interceptor
add deprecate addStanzaInterceptor().
2019-10-25 21:41:55 +02:00
Florian Schmaus
5db6191110 Introduce StanzaBuilder
As first step to immutable Stanza types.
2019-10-25 21:41:55 +02:00
Florian Schmaus
926c5892ad Fix 260c5539b ("Add support for XEP-0118: UserTune")
Fix a bug in the EqualsBuilder usage in UserTuneElement. Properly
synchronize listeners using CopyOnWriteSet. Make methods and fields
static where sensible and possible. Make
disableUserTuneNotifications() public (why was it private?). And a few
other minor fixes.
2019-10-17 12:27:33 +02:00
adiaholic
260c5539b5 Add support for XEP-0118: UserTune
This commit will enable user to communicate
information about music to which user is listening.
This feature is less of a requirement and more like fun to me.
An attempt at solving SMACK-257.

Incase you see any chances of improvement,
please let me know :)
2019-10-17 12:24:30 +02:00
Florian Schmaus
8f371c5381 Fix datatype.Scalar equals() and hashCode() methods
The previously used Number.equals() and hashCode() was just delegated
to Object and hence did not behave as expected.
2019-10-17 12:24:30 +02:00
Florian Schmaus
db150a850a Fix order of 'actual' and 'expected' in XmlUnitUtils 2019-10-16 19:35:22 +02:00
John Haubrich
7a58862794 gradle: Ensure git command is run projectDir rather than CWD.
The assert on line 659 was causing my build to fail. Two issues caused
gitCommit to be empty.

1. The cmd 'git describe --always --tags --dirty=+' was not given
   enough time to complete and had not exited which meant no text in
   proc.text
2. The two git commands on lines 653 and 658 were run from the
   CWD of my Eclipse IDE, not the $projectDir which caused git to return
   an error 128.

To solve the two issues I added a waitForOrKill method call to
proc (like the srCmd had) and I set the execute to run in $projectDir
which I think was the intent/assumption in the original code.

Also add waitFor on git describe command.
2019-10-12 10:34:05 +02:00