Florian Schmaus
935465a11b
Remove duplicate code in XmlStringBuilder
2019-09-04 10:22:55 +02:00
Florian Schmaus
85ef149c83
Make XmlStringBuilder.prelude() protected
...
as the user should never be required to call it.
2019-09-04 10:22:55 +02:00
Florian Schmaus
1a3067c89b
Enable werror for javadoc and fix javadoc issues
2019-08-30 12:08:30 +02:00
Florian Schmaus
851bd3c5dd
Add IllegalArgumentException to parsing exceptions
...
As it is thrown by many Element constructors.
2019-08-27 09:01:12 +02:00
Florian Schmaus
8f2eefaeb0
Fix whitespace errors in AbstractXMPPConnection
2019-08-22 15:28:54 +02:00
Florian Schmaus
c6b75d8bcc
Merge pull request #308 from adiaholic/SMACK-718
...
Prevent extremely long reply timeouts from being set.
2019-08-22 14:54:15 +02:00
Florian Schmaus
f863bd222c
Merge branch '4.3'
2019-08-22 11:52:41 +02:00
Florian Schmaus
01e0ae230b
Deprecate setHostAddressByNameOrIp() and move logic into setHost()
...
in ConnectionConfiguration.Builder.
2019-08-22 10:55:33 +02:00
Florian Schmaus
d7b7abc7eb
Delete XML whitespace before feeding the Base64 decoder
2019-08-06 12:48:31 +02:00
Florian Schmaus
1bc8a22b28
Add StringUtils.deleteXmlWhitespace(String)
2019-08-05 22:20:21 +02:00
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
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
4ca2c7cc69
Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks
2019-07-24 09:18:39 +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
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
df5899e72b
Introduce SmackConfiguration.SMACK_URL(_STRING)
2019-07-04 15:51:28 +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
e3ec422071
Try to lookup QNAME first in XmppElementUtil.getQNameFor()
2019-06-12 22:30:56 +02:00
Florian Schmaus
fa0c16d75c
Introduce EqualsUtil and HashCode.(Builder|Cache)
2019-06-12 14:51:17 +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
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
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
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
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
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