Skip to content

Commit 3f8aac7

Browse files
committed
Fix NullPointerException in NTLM auth
1 parent ee7d525 commit 3f8aac7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,17 @@ private static String stripDotSuffix(final String value) {
150150

151151
/** Convert host to standard form */
152152
private static String convertHost(final String host) {
153+
if (host == null) {
154+
return null;
155+
}
153156
return stripDotSuffix(host).toUpperCase();
154157
}
155158

156159
/** Convert domain to standard form */
157160
private static String convertDomain(final String domain) {
161+
if (domain == null) {
162+
return null;
163+
}
158164
return stripDotSuffix(domain).toUpperCase();
159165
}
160166

0 commit comments

Comments
 (0)