mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 03:27:59 +01:00
Merge branch '4.3'
This commit is contained in:
commit
f863bd222c
5 changed files with 57 additions and 26 deletions
|
@ -141,6 +141,32 @@ hr {
|
|||
|
||||
<div id="pageBody">
|
||||
|
||||
<h2>4.3.4 -- <span style="font-weight: normal;">2019-05-27</span></h2>
|
||||
|
||||
<h2> Bug
|
||||
</h2>
|
||||
<ul>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-861'>SMACK-861</a>] - Potential NPE in Roster.getPresencesInternal(BareJid)
|
||||
</li>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-863'>SMACK-863</a>] - ServiceDiscoveryManger does not use the main identity, causing setIdentity() to have no effect
|
||||
</li>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-864'>SMACK-864</a>] - Potential Denial of Service (DOS) by remote entities caused by unlimited threads for asynchronous operations
|
||||
</li>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-865'>SMACK-865</a>] - Some Manager.getInsanceFor() methods are missing the 'synchronized' keyword
|
||||
</li>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-868'>SMACK-868</a>] - XHTMLText.appendOpenBodyTag() produces invalid XML
|
||||
</li>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-870'>SMACK-870</a>] - TLS X.509 certificate verification should be performed with the ACE representation of the XMPP service domain when possible
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2> Improvement
|
||||
</h2>
|
||||
<ul>
|
||||
<li>[<a href='https://issues.igniterealtime.org/browse/SMACK-869'>SMACK-869</a>] - Exceptions in async tasks should not go uncaught to the call stack to avoid program termination
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>4.3.3 -- <span style="font-weight: normal;">2019-03-14</span></h2>
|
||||
|
||||
<h2> Bug
|
||||
|
|
|
@ -750,7 +750,7 @@ public abstract class ConnectionConfiguration {
|
|||
|
||||
/**
|
||||
* Set the Internet address of the host providing the XMPP service. If set, then this will overwrite anything
|
||||
* set via {@link #setHost(String)}.
|
||||
* set via {@link #setHost(CharSequence)}.
|
||||
*
|
||||
* @param address the Internet address of the host providing the XMPP service.
|
||||
* @return a reference to this builder.
|
||||
|
@ -762,16 +762,29 @@ public abstract class ConnectionConfiguration {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the name of the host providing the XMPP service. Note that this method does only allow DNS names and not
|
||||
* IP addresses. Use {@link #setHostAddress(InetAddress)} if you want to explicitly set the Internet address of
|
||||
* the host providing the XMPP service.
|
||||
* Set the name of the host providing the XMPP service. This method takes DNS names and
|
||||
* IP addresses.
|
||||
*
|
||||
* @param host the DNS name of the host providing the XMPP service.
|
||||
* @return a reference to this builder.
|
||||
*/
|
||||
public B setHost(String host) {
|
||||
DnsName hostDnsName = DnsName.from(host);
|
||||
return setHost(hostDnsName);
|
||||
public B setHost(CharSequence host) {
|
||||
String fqdnOrIpString = host.toString();
|
||||
if (InetAddressUtil.isIpAddress(fqdnOrIpString)) {
|
||||
InetAddress hostInetAddress;
|
||||
try {
|
||||
hostInetAddress = InetAddress.getByName(fqdnOrIpString);
|
||||
}
|
||||
catch (UnknownHostException e) {
|
||||
// Should never happen.
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
setHostAddress(hostInetAddress);
|
||||
} else {
|
||||
DnsName dnsName = DnsName.from(fqdnOrIpString);
|
||||
setHost(dnsName);
|
||||
}
|
||||
return getThis();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -795,23 +808,12 @@ public abstract class ConnectionConfiguration {
|
|||
* @see #setHost(DnsName)
|
||||
* @see #setHostAddress(InetAddress)
|
||||
* @since 4.3.2
|
||||
* @deprecated use {@link #setHost(CharSequence)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.5.
|
||||
public B setHostAddressByNameOrIp(CharSequence fqdnOrIp) {
|
||||
String fqdnOrIpString = fqdnOrIp.toString();
|
||||
if (InetAddressUtil.isIpAddress(fqdnOrIp)) {
|
||||
InetAddress hostInetAddress;
|
||||
try {
|
||||
hostInetAddress = InetAddress.getByName(fqdnOrIpString);
|
||||
}
|
||||
catch (UnknownHostException e) {
|
||||
// Should never happen.
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
setHostAddress(hostInetAddress);
|
||||
} else {
|
||||
setHost(fqdnOrIpString);
|
||||
}
|
||||
return getThis();
|
||||
return setHost(fqdnOrIp);
|
||||
}
|
||||
|
||||
public B setPort(int port) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2018 Florian Schmaus.
|
||||
* Copyright 2018-2019 Florian Schmaus.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -28,7 +28,7 @@ public class ConnectionConfigurationTest {
|
|||
DummyConnectionConfiguration.Builder builder = newUnitTestBuilder();
|
||||
|
||||
final String ip = "192.168.0.1";
|
||||
builder.setHostAddressByNameOrIp(ip);
|
||||
builder.setHost(ip);
|
||||
|
||||
DummyConnectionConfiguration connectionConfiguration = builder.build();
|
||||
assertEquals('/' + ip, connectionConfiguration.getHostAddress().toString());
|
||||
|
@ -39,7 +39,7 @@ public class ConnectionConfigurationTest {
|
|||
DummyConnectionConfiguration.Builder builder = newUnitTestBuilder();
|
||||
|
||||
final String fqdn = "foo.example.org";
|
||||
builder.setHostAddressByNameOrIp(fqdn);
|
||||
builder.setHost(fqdn);
|
||||
|
||||
DummyConnectionConfiguration connectionConfiguration = builder.build();
|
||||
assertEquals(fqdn, connectionConfiguration.getHost().toString());
|
||||
|
|
|
@ -294,6 +294,9 @@ public final class MultiUserChatManager extends Manager {
|
|||
* Returns a Set of the rooms where the user has joined. The Iterator will contain Strings where each String
|
||||
* represents a room (e.g. room@muc.jabber.org).
|
||||
*
|
||||
* Note: In order to get a list of bookmarked (but not necessarily joined) conferences, use
|
||||
* {@link org.jivesoftware.smackx.bookmarks.BookmarkManager#getBookmarkedConferences()}.
|
||||
*
|
||||
* @return a List of the rooms where the user has joined using a given connection.
|
||||
*/
|
||||
public Set<EntityBareJid> getJoinedRooms() {
|
||||
|
|
|
@ -1680,7 +1680,7 @@ public final class Roster extends Manager {
|
|||
@Override
|
||||
public void onSuccess(IQ packet) {
|
||||
final XMPPConnection connection = connection();
|
||||
LOGGER.log(Level.FINE, "RosterResultListener received {}", packet);
|
||||
LOGGER.log(Level.FINE, "RosterResultListener received {0}", packet);
|
||||
Collection<Jid> addedEntries = new ArrayList<>();
|
||||
Collection<Jid> updatedEntries = new ArrayList<>();
|
||||
Collection<Jid> deletedEntries = new ArrayList<>();
|
||||
|
|
Loading…
Reference in a new issue