aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2011-04-01 09:04:33 +0000
committerDamian Minkov <damencho@jitsi.org>2011-04-01 09:04:33 +0000
commit93ae5c8291517ea63a4c3a9e9bfe3e7bb7339a56 (patch)
tree754c475a3702906c3198106819cf9ae9d809ac5d
parentecabea4720377617e11ab7b457dc71bf5639d0b6 (diff)
downloadjitsi-93ae5c8291517ea63a4c3a9e9bfe3e7bb7339a56.zip
jitsi-93ae5c8291517ea63a4c3a9e9bfe3e7bb7339a56.tar.gz
jitsi-93ae5c8291517ea63a4c3a9e9bfe3e7bb7339a56.tar.bz2
Fix some exceptions kindly reported and tested by Sebastien Vincent. Fixing tests.
-rw-r--r--lib/felix.unit.test.properties3
-rw-r--r--src/net/java/sip/communicator/plugin/provisioning/ProvisioningActivator.java4
-rw-r--r--src/net/java/sip/communicator/service/httputil/HttpUtils.java34
-rw-r--r--src/net/java/sip/communicator/service/httputil/httputil.manifest.mf1
4 files changed, 25 insertions, 17 deletions
diff --git a/lib/felix.unit.test.properties b/lib/felix.unit.test.properties
index b71cadf..f45bbc3 100644
--- a/lib/felix.unit.test.properties
+++ b/lib/felix.unit.test.properties
@@ -73,8 +73,7 @@ felix.auto.start.5= \
reference:file:sc-bundles/googlecontacts.jar \
reference:file:sc-bundles/protocol.jar \
reference:file:sc-bundles/protocol-media.jar \
- reference:file:sc-bundles/httpcore.jar \
- reference:file:sc-bundles/httpclient.jar \
+ reference:file:sc-bundles/httputil.jar \
reference:file:sc-bundles/packetlogging.jar \
reference:file:sc-bundles/certificate.jar
diff --git a/src/net/java/sip/communicator/plugin/provisioning/ProvisioningActivator.java b/src/net/java/sip/communicator/plugin/provisioning/ProvisioningActivator.java
index 5f65235..970f9f2 100644
--- a/src/net/java/sip/communicator/plugin/provisioning/ProvisioningActivator.java
+++ b/src/net/java/sip/communicator/plugin/provisioning/ProvisioningActivator.java
@@ -483,6 +483,10 @@ public class ProvisioningActivator
usernameIx,
passwordIx);
+ // if there was an error in retrieving stop
+ if(res == null)
+ return null;
+
InputStream in = res.getContent();
// Chain a ProgressMonitorInputStream to the
diff --git a/src/net/java/sip/communicator/service/httputil/HttpUtils.java b/src/net/java/sip/communicator/service/httputil/HttpUtils.java
index c590fd0..d175acd 100644
--- a/src/net/java/sip/communicator/service/httputil/HttpUtils.java
+++ b/src/net/java/sip/communicator/service/httputil/HttpUtils.java
@@ -287,23 +287,27 @@ public class HttpUtils
// construct the name value pairs we will be sending
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
- for(int i = 0; i < formParamNames.length; i++)
+ // there can be no params
+ if(formParamNames != null)
{
- // we are on the username index, insert retrieved username value
- if(i == usernameParamIx && creds != null)
+ for(int i = 0; i < formParamNames.length; i++)
{
- parameters.add(new BasicNameValuePair(
- formParamNames[i], creds.getUserPrincipal().getName()));
- }// we are on the password index, insert retrieved password val
- else if(i == passwordParamIx && creds != null)
- {
- parameters.add(new BasicNameValuePair(
- formParamNames[i], creds.getPassword()));
- }
- else // common name value pair, all info is present
- {
- parameters.add(new BasicNameValuePair(
- formParamNames[i], formParamValues[i]));
+ // we are on the username index, insert retrieved username value
+ if(i == usernameParamIx && creds != null)
+ {
+ parameters.add(new BasicNameValuePair(
+ formParamNames[i], creds.getUserPrincipal().getName()));
+ }// we are on the password index, insert retrieved password val
+ else if(i == passwordParamIx && creds != null)
+ {
+ parameters.add(new BasicNameValuePair(
+ formParamNames[i], creds.getPassword()));
+ }
+ else // common name value pair, all info is present
+ {
+ parameters.add(new BasicNameValuePair(
+ formParamNames[i], formParamValues[i]));
+ }
}
}
diff --git a/src/net/java/sip/communicator/service/httputil/httputil.manifest.mf b/src/net/java/sip/communicator/service/httputil/httputil.manifest.mf
index fda4d87..cbac12c 100644
--- a/src/net/java/sip/communicator/service/httputil/httputil.manifest.mf
+++ b/src/net/java/sip/communicator/service/httputil/httputil.manifest.mf
@@ -27,6 +27,7 @@ Import-Package: org.xml.sax,
javax.imageio,
net.java.sip.communicator.util.xml,
net.java.sip.communicator.util,
+ net.java.sip.communicator.util.swing,
net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.certificate,
net.java.sip.communicator.service.credentialsstorage,