aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Fiedler2011-10-25 19:12:38 (EDT)
committerSteve Speicher2011-10-25 19:12:38 (EDT)
commit0a9fc09328d6f105654b6719e2e56e8ac674d64f (patch)
tree712ca14fbbd615654136211c898b6da453c39fc6
parent3a200095e60d13d81977c26303e4cd3722d9d13e (diff)
downloadorg.eclipse.lyo.testsuite-0a9fc09328d6f105654b6719e2e56e8ac674d64f.zip
org.eclipse.lyo.testsuite-0a9fc09328d6f105654b6719e2e56e8ac674d64f.tar.gz
org.eclipse.lyo.testsuite-0a9fc09328d6f105654b6719e2e56e8ac674d64f.tar.bz2
Bug362015 - Add NPE protection to OSLCUtils#getHttpClient
-rw-r--r--org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/server/util/OSLCUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/server/util/OSLCUtils.java b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/server/util/OSLCUtils.java
index 8acff98..1a9ead5 100644
--- a/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/server/util/OSLCUtils.java
+++ b/org.eclipse.lyo.testsuite.server/src/main/java/org/eclipse/lyo/testsuite/server/util/OSLCUtils.java
@@ -112,8 +112,9 @@ public class OSLCUtils {
if (httpclient == null)
{
httpclient = new DefaultHttpClient();
- setupLazySSLSupport(httpclient);
- httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);
+ setupLazySSLSupport(httpclient);
+ if (creds != null)
+ httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);
}
return httpclient;
}