File tree Expand file tree Collapse file tree 7 files changed +6
-9
lines changed
main/java/org/asynchttpclient
test/java/org/asynchttpclient
providers/netty/src/main/java/org/asynchttpclient/providers/netty/request Expand file tree Collapse file tree 7 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import static org .asynchttpclient .util .MiscUtils .getBoolean ;
16
16
17
- import org .asynchttpclient .util .DefaultHostnameVerifier ;
18
-
19
- import javax .net .ssl .HostnameVerifier ;
20
-
21
17
public final class AsyncHttpClientConfigDefaults {
22
18
23
19
private AsyncHttpClientConfigDefaults () {
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ public ProxyHostnameChecker() {
33
33
private Object getHostnameChecker () {
34
34
final ClassLoader classLoader = Thread .currentThread ().getContextClassLoader ();
35
35
try {
36
+ @ SuppressWarnings ("unchecked" )
36
37
final Class <Object > hostnameCheckerClass = (Class <Object >) classLoader .loadClass ("sun.security.util.HostnameChecker" );
37
38
final Method instanceMethod = hostnameCheckerClass .getMethod ("getInstance" , Byte .TYPE );
38
39
return instanceMethod .invoke (null , TYPE_TLS );
Original file line number Diff line number Diff line change 3
3
import static org .testng .Assert .assertEquals ;
4
4
5
5
import org .apache .commons .io .FileUtils ;
6
- import org .asynchttpclient .async .HostnameVerifierTest ;
7
6
import org .asynchttpclient .util .StandardCharsets ;
8
7
import org .eclipse .jetty .security .ConstraintMapping ;
9
8
import org .eclipse .jetty .security .ConstraintSecurityHandler ;
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ public void wrongStatusCode() throws Throwable {
109
109
final CountDownLatch latch = new CountDownLatch (1 );
110
110
final AtomicReference <Throwable > throwable = new AtomicReference <Throwable >();
111
111
112
- WebSocket websocket = c .prepareGet ("http://apache.org/" ).execute (new WebSocketUpgradeHandler .Builder ().addWebSocketListener (new WebSocketTextListener () {
112
+ c .prepareGet ("http://apache.org/" ).execute (new WebSocketUpgradeHandler .Builder ().addWebSocketListener (new WebSocketTextListener () {
113
113
114
114
@ Override
115
115
public void onMessage (String message ) {
@@ -149,7 +149,7 @@ public void wrongProtocolCode() throws Throwable {
149
149
final CountDownLatch latch = new CountDownLatch (1 );
150
150
final AtomicReference <Throwable > throwable = new AtomicReference <Throwable >();
151
151
152
- WebSocket websocket = c .prepareGet ("ws://www.google.com" ).execute (new WebSocketUpgradeHandler .Builder ().addWebSocketListener (new WebSocketTextListener () {
152
+ c .prepareGet ("ws://www.google.com" ).execute (new WebSocketUpgradeHandler .Builder ().addWebSocketListener (new WebSocketTextListener () {
153
153
154
154
@ Override
155
155
public void onMessage (String message ) {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ private void writeRequest(Channel channel) {
87
87
public void onFutureSuccess (final Channel channel ) throws ConnectException {
88
88
Channels .setAttribute (channel , future );
89
89
final HostnameVerifier hostnameVerifier = config .getHostnameVerifier ();
90
- final SslHandler sslHandler = channelManager .getSslHandler (channel .pipeline ());
90
+ final SslHandler sslHandler = ChannelManager .getSslHandler (channel .pipeline ());
91
91
if (hostnameVerifier != null && sslHandler != null ) {
92
92
final String host = future .getURI ().getHost ();
93
93
sslHandler .handshakeFuture ().addListener (new GenericFutureListener <Future <? super Channel >>() {
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ private <T> ListenableFuture<T> sendRequestWithCertainForceConnect(//
141
141
* until we get a valid channel from the pool and it's still valid once the
142
142
* request is built
143
143
*/
144
+ @ SuppressWarnings ("unused" )
144
145
private <T > ListenableFuture <T > sendRequestThroughSslProxy (//
145
146
Request request ,//
146
147
AsyncHandler <T > asyncHandler ,//
@@ -443,6 +444,7 @@ public boolean applyIoExceptionFiltersAndReplayRequest(NettyResponseFuture<?> fu
443
444
444
445
boolean replayed = false ;
445
446
447
+ @ SuppressWarnings ({ "unchecked" , "rawtypes" })
446
448
FilterContext <?> fc = new FilterContext .FilterContextBuilder ().asyncHandler (future .getAsyncHandler ()).request (future .getRequest ()).ioException (e ).build ();
447
449
for (IOExceptionFilter asyncFilter : config .getIOExceptionFilters ()) {
448
450
try {
Original file line number Diff line number Diff line change 19
19
import org .asynchttpclient .RandomAccessBody ;
20
20
import org .asynchttpclient .providers .netty .NettyAsyncHttpProviderConfig ;
21
21
import org .asynchttpclient .providers .netty .channel .ChannelManager ;
22
- import org .asynchttpclient .providers .netty .channel .Channels ;
23
22
import org .asynchttpclient .providers .netty .future .NettyResponseFuture ;
24
23
import org .asynchttpclient .providers .netty .request .ProgressListener ;
25
24
import org .asynchttpclient .providers .netty .request .body .FeedableBodyGenerator .FeedListener ;
You can’t perform that action at this time.
0 commit comments