Browse Source

Merge "Fix NPE in HttpAuthMethod"

stable-4.3
Christian Halstrick 9 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
6dfad98d72
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java

3
org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java

@ -219,7 +219,8 @@ abstract class HttpAuthMethod {
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;

Loading…
Cancel
Save