1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-18 10:02:05 +01:00
Commit graph

4177 commits

Author SHA1 Message Date
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
Florian Schmaus
b510d373b5 reactor: have synchronized block include peeking at scheduled actions
If we do not peek at the scheduled actions in the reactors
synchronized block, then there is a kind of lost-update problem. While
Ractor.schedule() will call wakeup() on the selector, a thread could
have already determined the value of selectWait, while being blocked
at the start of the synchronized reactor section. Once it is able to
enter the section, it will use an outdated selectWait value.

This leads to scheduled actions not being executed on time.

Thanks to Eng ChongMeng for reporting this and suggesting the fix.
2019-10-12 10:22:31 +02:00
Florian Schmaus
05c920ab56 Fix typo in comment 2019-10-12 10:14:17 +02:00
Florian Schmaus
e23babf147 Add Stanza.setNewStanzaId() and ensureStanzaIdSet()
Also deprecate setStanzaId() since it was not clear if this would
create a new stanza ID or just ensure that one is set.
2019-10-05 23:16:15 +02:00