@@ -112,7 +112,7 @@ protected void configure(HttpClientTestOptions.Builder optionsBuilder) {
112112 });
113113 }
114114
115- private AsyncHttpClient createClient (boolean readTimeout ) {
115+ private static AsyncHttpClient createClient (boolean readTimeout ) {
116116 DefaultAsyncHttpClientConfig .Builder builder =
117117 new DefaultAsyncHttpClientConfig .Builder ()
118118 .setMaxRequestRetry (0 )
@@ -128,31 +128,31 @@ private AsyncHttpClient createClient(boolean readTimeout) {
128128 AsyncHttpClientConfig asyncHttpClientConfig = builder .build ();
129129 return new DefaultAsyncHttpClient (asyncHttpClientConfig );
130130 }
131- }
132131
133- class CustomNameResolver extends InetNameResolver {
132+ private static class CustomNameResolver extends InetNameResolver {
134133
135- public CustomNameResolver (EventExecutor executor ) {
136- super (executor );
137- }
134+ public CustomNameResolver (EventExecutor executor ) {
135+ super (executor );
136+ }
138137
139- @ Override
140- protected void doResolve (String inetHost , Promise <InetAddress > promise ) throws Exception {
141- try {
142- promise .setSuccess (InetAddress .getByName (inetHost ));
143- } catch (UnknownHostException exception ) {
144- promise .setFailure (exception );
138+ @ Override
139+ protected void doResolve (String inetHost , Promise <InetAddress > promise ) throws Exception {
140+ try {
141+ promise .setSuccess (InetAddress .getByName (inetHost ));
142+ } catch (UnknownHostException exception ) {
143+ promise .setFailure (exception );
144+ }
145145 }
146- }
147146
148- @ Override
149- protected void doResolveAll (String inetHost , Promise <List <InetAddress >> promise )
150- throws Exception {
151- try {
152- // default implementation calls InetAddress.getAllByName
153- promise .setSuccess (Collections .singletonList (InetAddress .getByName (inetHost )));
154- } catch (UnknownHostException exception ) {
155- promise .setFailure (exception );
147+ @ Override
148+ protected void doResolveAll (String inetHost , Promise <List <InetAddress >> promise )
149+ throws Exception {
150+ try {
151+ // default implementation calls InetAddress.getAllByName
152+ promise .setSuccess (Collections .singletonList (InetAddress .getByName (inetHost )));
153+ } catch (UnknownHostException exception ) {
154+ promise .setFailure (exception );
155+ }
156156 }
157157 }
158158}
0 commit comments