Florian Schmaus
92b02afbff
Improve exceptions of Socks5Proxy
2019-06-11 12:47:40 +02:00
Florian Schmaus
818ee8a727
Make Objects.requireNonNull() throw IllegalArgumentException
...
and not NullPointerException. Altough this differs from
java.util.Objects behavior, throwing an IllegalArgumentException
appears more sensible and makes it easier to catch it in Smack's
parsing function.
2019-06-11 12:47:40 +02:00
Florian Schmaus
9bb36fc63c
Make Socks5TestProxy a subclass of Socks5Proxy
...
to reduce the duplicated code. This also means we are now testing the
real implementation.
2019-06-11 12:47:39 +02:00
Florian Schmaus
6e1193edaf
Use QName instead of XmppStringUtils.generateKey()
2019-06-11 12:47:39 +02:00
Florian Schmaus
7d59df9eed
Change type of presence priority to 'Byte'
2019-06-11 12:47:39 +02:00
Florian Schmaus
e911874e72
Make MultiMap use generics where sensible
...
I wonder why I orginally did not do it that way…
2019-06-11 12:47:39 +02:00
Florian Schmaus
ce70308099
Introduce UInt(16|32) datatypes
2019-06-11 12:47:39 +02:00
Florian Schmaus
c0183775fe
Add support for XEP-0221: Data Forms Media Element
...
Fixes SMACK-824.
2019-06-11 12:47:39 +02:00
Florian Schmaus
832b20a897
Add XmlPullParser.getAttributeValue(String)
2019-06-11 12:47:39 +02:00
Florian Schmaus
b834df65e9
Add NumberUtil.requireUShort16(int)
2019-06-11 12:47:39 +02:00
Florian Schmaus
b3b242f397
Add TODO comment to XmlStringBuilder
2019-06-11 12:47:39 +02:00
Florian Schmaus
1f8b7273a8
Improve junit test in Socks5ByteStreamManager
...
It could be that the test is flapping. This helps to see the origin of
the unexpected exception.
2019-06-11 12:47:39 +02:00
Florian Schmaus
4d36e3b521
Introduce FormFieldChildElement and make FormField immutable
2019-06-11 12:47:39 +02:00
Florian Schmaus
1a99801501
Fix typo in FormField's javadoc: s/fold/field/
2019-06-05 10:54:17 +02:00
Florian Schmaus
3c306eaff9
Improve comment in SmackReactor
2019-06-05 10:54:07 +02:00
Florian Schmaus
9a2cca2bd3
Merge branch 'master' of github.com:Flowdalic/Smack
2019-06-03 17:41:49 +02:00
Florian Schmaus
b288768f77
Introduce util.InternetAddress
...
and use it where sensible. Also fixes a few unit tests along the way.
2019-06-03 17:41:10 +02:00
Florian Schmaus
4334ca33ff
Add missing selector.wakeup() in SmackRactor.schedule()
...
Without this, newly scheduled runnables would potentially not be
scheduled in case the reactor thread was blocking in select(0)
indefinetly.
Thanks to Eng ChongMeng for reporting this.
2019-06-03 09:28:52 +02:00
Florian Schmaus
027cae3bd0
Remove unnecessary synchronization in SmackReater.schedule()
...
The DelayQueue 'scheduledActions' is already thread-safe.
2019-06-03 09:27:28 +02:00
Florian Schmaus
619b8e6f4a
Add secure(OnlineAttackSafe|Unique|OfflineAttackSafe)RandomString()
...
and replace usages of java.util.UUID in Smack with
secureUniqueRandomString() because it uses a thread-local secure random
number generator.
2019-06-02 20:08:03 +02:00
Florian Schmaus
58fc39714f
Use assertThrows() in Socks5ByteStreamManagerTest
2019-06-02 11:00:37 +02:00
Florian Schmaus
839e347676
Rename NumberUtil.checkIfInUInt32Range() to requireUInt32
2019-06-02 10:46:53 +02:00
Florian Schmaus
726a2de273
Deprecate ParserUtils.getQName()
2019-06-02 10:44:50 +02:00
Florian Schmaus
af6ee76f4c
Remove empty lines in Socks5BytestreamManager
2019-06-02 10:41:39 +02:00
Florian Schmaus
49aa7ce21b
Do not swallow exception in Socks5BytestreamManager
2019-06-02 10:41:27 +02:00
Florian Schmaus
6619372bb8
Enable parallel unit test execution
2019-06-02 10:40:44 +02:00
Florian Schmaus
9352225f44
Rework SOCKS5 unit tests so that they can be run in parallel
...
As result it is now also possible to start multiple local SOCKS5
proxies with different port, which is usually not necessary in real
life but useful for unit tests.
2019-06-02 10:38:19 +02:00
Florian Schmaus
d337474a86
Add DiscoverItems.Item.toString()
2019-05-23 23:06:39 +02:00
Florian Schmaus
02f7cfcf27
Improve session sweeping logic in AdHocCommandManager
...
Fixes SMACK-624.
2019-05-20 10:41:01 +02:00
Florian Schmaus
e8d9aed4be
Merge pull request #303 from adiaholic/SMACK-839
...
Generic Exception replaced with Type Specific Exceptions.
2019-05-20 09:44:04 +02:00
adiaholic
f91044657f
Generic Exception replaced with Type Specific Exceptions.
...
'parseAndProcessStanza()' throws generic Exceptions.
Since there are plenty of exceptions that should not be
catched by smack, it's better to throw Type Specific Exceptions.
This Commit is was in response to SMACK-839.
2019-05-19 17:09:01 +05:30
Florian Schmaus
04238bd36a
Add CloseableUtil.maybeClose(Closeable)
2019-05-18 13:25:31 +02:00
Florian Schmaus
02e2eba556
Socks5Proxy: Remove empty line
2019-05-18 13:24:48 +02:00
Florian Schmaus
48010f3b82
Socks5Proxy: Log if server thread termination was interrupted
2019-05-18 13:24:30 +02:00
Florian Schmaus
11ae6d6960
Socks5Proxy: Use CloseableUtil to close server socket
2019-05-18 13:24:05 +02:00
Florian Schmaus
ab99f629a3
Socks5Proxy: Include server socket in thread name
2019-05-18 13:23:24 +02:00
Florian Schmaus
f7762c5db7
Add "whitespace after comma" checkstyle rule
2019-05-17 21:56:46 +02:00
Florian Schmaus
db5f6f648c
Bump AnimalSniffer to 1.5.0
2019-05-17 18:04:27 +02:00
Florian Schmaus
7e25c3ada5
Merge branch '4.3'
2019-05-16 20:52:27 +02:00
Florian Schmaus
2ceadc0de1
Introduce verificationSuccessful boolean
2019-05-16 16:51:31 +02:00
Florian Schmaus
f60e4055ec
Use ACE representation of XMPP domain on certificate verification
...
This is based on the patch provided by Georg Lukas, modified to take
XMPP domain names that can not be represented as DNS names into
account. See c42d2eea24 (r269250137)
Fixes SMACK-870.
2019-05-16 14:14:10 +02:00
Florian Schmaus
381190a45c
Add ConnectionConfiguration.getXmppServiceDomainAsDnsNameIfPossible()
...
in preperation of SMACK-870, so that the DNS name can be used for the
certificate verification.
2019-05-16 14:02:28 +02:00
Florian Schmaus
04f1d79d72
Try GC in MemoryLeakTestUtil.assertReferencesQueueSize()
...
It appears that we observe a partion GC run on some systems,
especially ones with few resources. Hopefully this increases the
chances to observe the expected GC affects so that the unit test
passes also on those systems.
2019-05-09 12:33:43 +02:00
Florian Schmaus
2dedd75cd7
Add comment about Thread.yield() in MemoryLeakTestUtil
2019-05-09 12:06:01 +02:00
Florian Schmaus
edcde28ecd
Set UncaughtExceptionHandler for CACHED_EXECUTOR_SERVICE
...
In order to avoid uncaught exceptions from terminating the
program (SMACK-896).
2019-05-09 11:04:26 +02:00
Florian Schmaus
49f4de0cdb
Replace 'key' with QName
2019-05-08 21:10:39 +02:00
Florian Schmaus
7c6d1f4340
Remove no-op configure block in build.gradle
...
Become a no-op configure block with
4108b9a83e
.
2019-05-08 20:43:45 +02:00
Florian Schmaus
f6be434f66
Remove deprecated methods in StanzaCollector
2019-05-08 20:42:08 +02:00
Florian Schmaus
68b7eb26f3
Fix PacketWriterTest: Expect also InterruptedException
...
which is thrown in case the queue was shut down.
2019-05-08 15:19:48 +02:00
Florian Schmaus
32429bcb9c
Add message to InterruptedException if blocking queue was shut down
2019-05-08 15:19:10 +02:00