Skip to content

Commit 47c1ed1

Browse files
committed
format
1 parent d16039c commit 47c1ed1

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

client/src/main/java/org/asynchttpclient/resolver/RequestHostnameResolver.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,29 @@ public Future<List<InetSocketAddress>> resolve(Request request, ProxyServer prox
6363

6464
final Future<List<InetAddress>> whenResolved = request.getNameResolver().resolveAll(name);
6565

66-
whenResolved.addListener(new SimpleFutureListener<List<InetAddress>>() {
67-
68-
@Override
69-
protected void onSuccess(List<InetAddress> value) throws Exception {
70-
ArrayList<InetSocketAddress> socketAddresses = new ArrayList<>(value.size());
71-
for (InetAddress a : value) {
72-
socketAddresses.add(new InetSocketAddress(a, port));
73-
}
74-
if (asyncHandlerExtensions != null) {
75-
asyncHandlerExtensions.onHostnameResolutionSuccess(name, socketAddresses);
76-
}
77-
promise.trySuccess(socketAddresses);
66+
whenResolved.addListener(new SimpleFutureListener<List<InetAddress>>() {
67+
68+
@Override
69+
protected void onSuccess(List<InetAddress> value) throws Exception {
70+
ArrayList<InetSocketAddress> socketAddresses = new ArrayList<>(value.size());
71+
for (InetAddress a : value) {
72+
socketAddresses.add(new InetSocketAddress(a, port));
73+
}
74+
if (asyncHandlerExtensions != null) {
75+
asyncHandlerExtensions.onHostnameResolutionSuccess(name, socketAddresses);
7876
}
77+
promise.trySuccess(socketAddresses);
78+
}
7979

80-
@Override
81-
protected void onFailure(Throwable t) throws Exception {
82-
if (asyncHandlerExtensions != null) {
83-
asyncHandlerExtensions.onHostnameResolutionFailure(name, t);
84-
}
85-
promise.tryFailure(t);
80+
@Override
81+
protected void onFailure(Throwable t) throws Exception {
82+
if (asyncHandlerExtensions != null) {
83+
asyncHandlerExtensions.onHostnameResolutionFailure(name, t);
8684
}
87-
});
85+
promise.tryFailure(t);
86+
}
87+
});
8888

89-
return promise;
89+
return promise;
9090
}
9191
}

0 commit comments

Comments
 (0)