From 786da6501f04d9a3f971405d8fb910d505ab8a39 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Wed, 26 Aug 2015 21:23:47 +0000 Subject: [PATCH] Statement unnecessarily nested within else clause. git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1698005 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/http/impl/auth/win/WindowsNegotiateScheme.java | 6 ++---- .../java/org/apache/http/impl/client/WinHttpClients.java | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java b/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java index 19c3cc4fb..9246f706a 100644 --- a/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java +++ b/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java @@ -202,9 +202,8 @@ public class WindowsNegotiateScheme implements AuthScheme { failAuthCleanup(); if (ex instanceof Win32Exception) { throw new AuthenticationException("Authentication Failed", ex); - } else { - throw ex; } + throw ex; } } else if (challenge == null || challenge.isEmpty()) { failAuthCleanup(); @@ -220,9 +219,8 @@ public class WindowsNegotiateScheme implements AuthScheme { failAuthCleanup(); if (ex instanceof Win32Exception) { throw new AuthenticationException("Authentication Failed", ex); - } else { - throw ex; } + throw ex; } } return scheme + " " + response; diff --git a/httpclient-win/src/main/java/org/apache/http/impl/client/WinHttpClients.java b/httpclient-win/src/main/java/org/apache/http/impl/client/WinHttpClients.java index 9ac5df33e..984c1bc85 100644 --- a/httpclient-win/src/main/java/org/apache/http/impl/client/WinHttpClients.java +++ b/httpclient-win/src/main/java/org/apache/http/impl/client/WinHttpClients.java @@ -74,9 +74,8 @@ public class WinHttpClients { .build(); return HttpClientBuilder.create() .setDefaultAuthSchemeRegistry(authSchemeRegistry); - } else { - return HttpClientBuilder.create(); } + return HttpClientBuilder.create(); } /**