Merge "Fix NPE in HttpAuthMethod"

This commit is contained in:
Christian Halstrick 2015-12-08 02:25:34 -05:00 committed by Gerrit Code Review @ Eclipse.org
commit 6dfad98d72
1 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,8 @@ boolean authorize(URIish uri, CredentialsProvider credentialsProvider) {
if (credentialsProvider.supports(u, p)
&& credentialsProvider.get(uri, u, p)) {
username = u.getValue();
password = new String(p.getValue());
char[] v = p.getValue();
password = (v == null) ? null : new String(p.getValue());
p.clear();
} else
return false;