Skip to content

Commit 568fc84

Browse files
author
Stephane Landelle
committed
Minor clean up
1 parent 3cff862 commit 568fc84

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/com/ning/http/client/Realm.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818

1919
import static com.ning.http.util.MiscUtil.isNonEmpty;
2020

21-
import org.slf4j.Logger;
22-
import org.slf4j.LoggerFactory;
23-
2421
import java.io.UnsupportedEncodingException;
2522
import java.security.MessageDigest;
2623
import java.security.NoSuchAlgorithmException;
2724

25+
import com.ning.http.util.MiscUtil;
26+
2827
/**
2928
* This class is required when authentication is needed. The class support DIGEST and BASIC.
3029
*/
@@ -260,8 +259,6 @@ public int hashCode() {
260259
*/
261260
public static class RealmBuilder {
262261

263-
private static final Logger logger = LoggerFactory.getLogger(RealmBuilder.class);
264-
265262
//
266263
// Portions of code (newCnonce, newResponse) are highly inspired be Jetty 6 BasicAuthentication.java class.
267264
// This code is already Apache licenced.
@@ -439,7 +436,7 @@ public RealmBuilder parseWWWAuthenticateHeader(String headerLine) {
439436
setAlgorithm(match(headerLine, "algorithm"));
440437
setOpaque(match(headerLine, "opaque"));
441438
setQop(match(headerLine, "qop"));
442-
if (getNonce() != null && !getNonce().equalsIgnoreCase("")) {
439+
if (isNonEmpty(getNonce())) {
443440
setScheme(AuthScheme.DIGEST);
444441
} else {
445442
setScheme(AuthScheme.BASIC);

0 commit comments

Comments
 (0)