mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Remove unrequired assignment of value to connectionEndpoint variable
The current code would work just fine for a connection having multiple endpoints. However, when there is only one endpoint ConnectionAttemptState.nextAddress() would return null, since connectionEndpointIterator has already iterated over the only possible value in the contructor leading to a NullPointerException. This means that during establishment of a connection having multiple endpoints, the first value inside connectionEndpointIterator would always be overlooked.
This commit is contained in:
parent
bc503c7475
commit
45f75d5ce0
1 changed files with 0 additions and 1 deletions
|
@ -69,7 +69,6 @@ public final class ConnectionAttemptState {
|
||||||
|
|
||||||
List<Rfc6120TcpRemoteConnectionEndpoint> endpoints = discoveredEndpoints.result.discoveredRemoteConnectionEndpoints;
|
List<Rfc6120TcpRemoteConnectionEndpoint> endpoints = discoveredEndpoints.result.discoveredRemoteConnectionEndpoints;
|
||||||
connectionEndpointIterator = endpoints.iterator();
|
connectionEndpointIterator = endpoints.iterator();
|
||||||
connectionEndpoint = connectionEndpointIterator.next();
|
|
||||||
connectionExceptions = new ArrayList<>(endpoints.size());
|
connectionExceptions = new ArrayList<>(endpoints.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue