summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2015-12-08 02:25:34 -0500
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2015-12-08 02:25:35 -0500
commit6dfad98d7237236661414f96eb302ed1013a2ecc (patch)
treead9dff4f700c7cd68ef5fc97676d487f994dbdf6
parente12482deed7b6120b4f65da042dc73912c4c4075 (diff)
parentac89b47eeb3c843b2686739cc4ca75e7b14b7bbb (diff)
downloadjgit-6dfad98d7237236661414f96eb302ed1013a2ecc.tar.gz
jgit-6dfad98d7237236661414f96eb302ed1013a2ecc.zip
Merge "Fix NPE in HttpAuthMethod"
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
index 3594ea91b4..998f280014 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
+++ b/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;