File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
httpclient/src/test/java/org/baeldung/httpclient Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -143,13 +143,12 @@ public final void givenDeprecatedApi_whenClientUsesCustomUserAgent_thenCorrect()
143143 response = client .execute (request );
144144 }
145145
146- @ SuppressWarnings ("deprecation" )
147146 @ Test
148147 public final void givenDeprecatedApi_whenRequestHasCustomUserAgent_thenCorrect () throws ClientProtocolException , IOException {
149- final DefaultHttpClient client = new DefaultHttpClient ();
148+ instance = HttpClients . custom (). build ();
150149 final HttpGet request = new HttpGet (SAMPLE_URL );
151150 request .setHeader (HttpHeaders .USER_AGENT , "Mozilla/5.0 Firefox/26.0" );
152- response = client .execute (request );
151+ response = instance .execute (request );
153152 }
154153
155154 @ Test
You can’t perform that action at this time.
0 commit comments