Skip to content

Commit 8872b68

Browse files
committed
Small cleanup, no functional change
1 parent ba67d81 commit 8872b68

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) thr
10331033
Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm();
10341034

10351035
HttpResponseStatus status = new ResponseStatus(future.getURI(), response, this);
1036-
FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build();
1036+
FilterContext<?> fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build();
10371037
for (ResponseFilter asyncFilter : config.getResponseFilters()) {
10381038
try {
10391039
fc = asyncFilter.filter(fc);
@@ -1248,7 +1248,7 @@ public Object call() throws Exception {
12481248
}
12491249
} catch (Exception t) {
12501250
if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) {
1251-
FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler())
1251+
FilterContext<?> fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler())
12521252
.request(future.getRequest()).ioException(IOException.class.cast(t)).build();
12531253
fc = handleIoException(fc, future);
12541254

@@ -1316,14 +1316,7 @@ private Realm ntlmChallenge(List<String> wwwAuth,
13161316
String challengeHeader = ntlmEngine.generateType1Msg(ntlmDomain, ntlmHost);
13171317

13181318
headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader);
1319-
1320-
Realm.RealmBuilder realmBuilder;
1321-
if (realm != null) {
1322-
realmBuilder = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme());
1323-
} else {
1324-
realmBuilder = new Realm.RealmBuilder();
1325-
}
1326-
newRealm = realmBuilder
1319+
newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme())
13271320
.setUri(URI.create(request.getUrl()).getPath())
13281321
.setMethodName(request.getMethod())
13291322
.setNtlmMessageType2Received(true)
@@ -1472,7 +1465,7 @@ public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws
14721465
future.touch();
14731466

14741467
if (config.getIOExceptionFilters().size() > 0) {
1475-
FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler())
1468+
FilterContext<?> fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler())
14761469
.request(future.getRequest()).ioException(new IOException("Channel Closed")).build();
14771470
fc = handleIoException(fc, future);
14781471

@@ -1600,7 +1593,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
16001593
if (IOException.class.isAssignableFrom(cause.getClass())) {
16011594

16021595
if (config.getIOExceptionFilters().size() > 0) {
1603-
FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler())
1596+
FilterContext<?> fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler())
16041597
.request(future.getRequest()).ioException(new IOException("Channel Closed")).build();
16051598
fc = handleIoException(fc, future);
16061599

0 commit comments

Comments
 (0)