Florian Schmaus
ce70308099
Introduce UInt(16|32) datatypes
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
4d36e3b521
Introduce FormFieldChildElement and make FormField immutable
2019-06-11 12:47:39 +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
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
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
f7762c5db7
Add "whitespace after comma" checkstyle rule
2019-05-17 21:56:46 +02:00
Florian Schmaus
7e25c3ada5
Merge branch '4.3'
2019-05-16 20:52:27 +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
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
f6be434f66
Remove deprecated methods in StanzaCollector
2019-05-08 20:42:08 +02:00
Florian Schmaus
32429bcb9c
Add message to InterruptedException if blocking queue was shut down
2019-05-08 15:19:10 +02:00
Florian Schmaus
d20a2675a8
Make StanzaCollector final
2019-05-08 12:44:48 +02:00
Florian Schmaus
d2f5efcb20
Use StandardCharsets.(UTF_8|US_ASCII)
...
This also gets rid of a ton of UnsupportedEncodingException s.
2019-05-08 12:44:48 +02:00
Florian Schmaus
7f0dc72dab
Update errorprone(-plugin) and make Unused(Variable|Method) an error
2019-05-07 23:09:00 +02:00
Florian Schmaus
68d7d738b6
Remove all tabs and add checkstyle rule that enforces no-tabs
...
Fixes SMACK-866.
2019-05-07 21:24:00 +02:00
Florian Schmaus
505493d889
Add XmlStringBuilder.optAttribute(String, Number)
2019-05-07 10:18:55 +02:00
Florian Schmaus
4133eb175c
Replace XPP3 by XmlPullParser interface wrapping StAX and XPP3
...
Introducing Smack's own XmlPullParser interface which tries to stay as
compatible as possible to XPP3. The interface is used to either wrap
StAX's XMLStreamReader if Smack is used on Java SE, and XPP3's
XmlPullParser if Smack is used on on Android.
Fixes SMACK-591.
Also introduce JUnit 5 and non-strict javadoc projects.
2019-05-06 22:10:50 +02:00
Florian Schmaus
99bf8316f5
Add javadoc about callbacks to XMPPConnection
2019-04-16 09:33:07 +02:00
Florian Schmaus
9c30e4f3cc
Merge branch '4.3'
2019-04-16 09:27:48 +02:00
Florian Schmaus
6076a9dfa5
Introduce asyncGoLimited()
...
which limits the number of threads created for asynchronous
operations.
Fixes SMACK-864.
2019-04-14 21:40:09 +02:00
Florian Schmaus
474ea68d4a
Remove unused method in Smack's Base64 API
2019-04-09 10:56:47 +02:00
Florian Schmaus
62fd897cf7
Add support for XEP-0418: DNS Queries over XMPP (DoX)
...
Fixes SMACK-862.
2019-04-09 10:56:47 +02:00
Florian Schmaus
75b1d8ce13
Add AbstractError.Builder.setDescriptiveEnText(String, Exception)
2019-04-09 09:33:32 +02:00
Florian Schmaus
1122bf394c
Add ExceptionUtil
2019-04-09 09:33:32 +02:00
Florian Schmaus
3075430713
Use IQ.isRequestIQ() in IQ
2019-04-09 09:33:32 +02:00
Florian Schmaus
d1f2631771
Use IQ.isResponseIQ() in AbstractXMPPConnection
2019-04-09 09:33:32 +02:00
Florian Schmaus
87e0ac9ba1
Add IQ.isResponseIQ()
2019-04-09 09:33:32 +02:00
Florian Schmaus
7d5274dad1
Use java.util.Base64 and remove build-in Base64 API
2019-04-09 09:33:32 +02:00
Florian Schmaus
d6b6fdca17
Add ConnectionConfiguration.setXmppAddressAndPassword()
2019-04-07 16:44:04 +02:00
Florian Schmaus
38384a1eed
Improve javadoc of ConnectionConfiguration
2019-04-07 16:43:48 +02:00
Florian Schmaus
89c0fa4b99
Let StringUtils.(insecure)randomString() return empty string
...
in case length is zero. Also do throw a NegativeArraySizeException if
length is negative instead of returning null.
This fixes the following sporadic test issue:
org.jivesoftware.smackx.ox.PainlessOpenPgpProviderTest > encryptDecryptTest FAILED
java.lang.AssertionError
at org.jivesoftware.smack.util.XmlStringBuilder.escape(XmlStringBuilder.java:425)
at org.jivesoftware.smackx.ox.element.EncryptedOpenPgpContentElement.addCommonXml(EncryptedOpenPgpContentElement.java:65)
at org.jivesoftware.smackx.ox.element.CryptElement.toXML(CryptElement.java:51)
at org.jivesoftware.smackx.ox.element.CryptElement.toXML(CryptElement.java:31)
at org.jivesoftware.smack.packet.Element.toXML(Element.java:41)
at org.jivesoftware.smackx.ox.element.OpenPgpContentElement.toInputStream(OpenPgpContentElement.java:186)
at org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider.encrypt(PainlessOpenPgpProvider.java:136)
at org.jivesoftware.smackx.ox.PainlessOpenPgpProviderTest.encryptDecryptTest(PainlessOpenPgpProviderTest.java:155)
because EncryptedOpenPgpContentElement rpad field was sometimes
'null' in case the random function returned '0' as length.
2019-03-25 18:58:58 +01:00
Florian Schmaus
14f288a763
Introduce RandomUtil
...
and use it in EncryptedOpenPgpContentElement
2019-03-25 18:58:58 +01:00
Florian Schmaus
a23adfab6e
Merge branch '4.3'
2019-03-24 00:16:24 +01:00
Oliver Mihatsch
007a04c4fe
Better error messages when using a Proxy to connect to the XMPP server.
2019-03-24 00:12:32 +01:00
Oliver Mihatsch
3450ffad2b
Do not use "CONNECT" in the Host header field.
2019-03-24 00:09:54 +01:00
Florian Schmaus
8e52e80399
Synchronize later in notifyConnectionError(Exception)
...
especially *after* the sync points have been notified so that a
potential thread currently callin gconnect()/login() throws and leaves
the synchronized section.
This commit is more or less equivalent to
3ded023629
of the 4.3 branch.
2019-03-16 10:43:41 +01:00
Florian Schmaus
daab6039a1
Smack 4.3.3
...
-----BEGIN PGP SIGNATURE-----
iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAlyKV9tfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
IFL4vQf/Qfg3VzNEnmk0+KjOtuvfAbhMfzE92gfo15vE0PPEIe9VA0Pzkvqhva4k
Efw7BhD2zx8hWvo0d5FfkdII89hSYnOCiSmhiX1Ln9q/gUqFW0TDAKpsMfAl7jAK
Fap8M7uUStP9T6fF/gq01djYCYoWA/4v1lGKv4J4b9gWCqzGIF2sK0M7of7VERnr
pEXJSUM228rk6EYjVmX/9Ujo1Y+xaNMFFZZSbKYrirAqjP540v0OPBCRQyB8qFaI
NTcNJ+qESe6Q80mw5V+y/kD6kX0LERSDB+pigzOOOlmfMtD1uADR84tAynuTKNAU
7/5K/YSQxceRY6RTgD17Al5lHIH5nw==
=ToR+
-----END PGP SIGNATURE-----
Merge tag '4.3.3'
Smack 4.3.3
2019-03-14 18:23:33 +01:00
Florian Schmaus
569f7417a8
Add AuthenticatedConnectionInitiallyEstablished timestamp
2019-03-10 21:24:37 +01:00
Florian Schmaus
c4289b2c18
Add AbstractXMPPConnection.initState()
...
and init/reset the sychronization points there.
This method is called right at the beginning of connect() and at the
end of shutdown().
2019-03-10 21:24:37 +01:00
Florian Schmaus
7518bf9a25
Add descriptive text to StanzaError.toString()
2019-03-10 21:24:37 +01:00