Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-06-30 12:40:55 -0400
committerslewis2010-06-30 12:40:55 -0400
commita7871d4582fbfef07d41429278239aa8973e74b7 (patch)
treedb840b7cfce45598bc40dcd46b74673c9afc4f92
parent3508b0571881e45578b0d8e2fb3f44b1a8a3ddfb (diff)
downloadorg.eclipse.ecf-a7871d4582fbfef07d41429278239aa8973e74b7.tar.gz
org.eclipse.ecf-a7871d4582fbfef07d41429278239aa8973e74b7.tar.xz
org.eclipse.ecf-a7871d4582fbfef07d41429278239aa8973e74b7.zip
Fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=318373
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java29
1 files changed, 11 insertions, 18 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java b/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java
index 334a29013..10c31dd33 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java
@@ -9,8 +9,8 @@
*******************************************************************************/
package org.eclipse.ecf.remoteservice.rest.client;
-import java.io.*;
-import java.net.URLEncoder;
+import java.io.IOException;
+import java.io.NotSerializableException;
import java.util.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.auth.AuthScope;
@@ -248,22 +248,15 @@ public class RestClientService extends AbstractClientService {
List nameValueList = new ArrayList();
if (restParameters != null) {
for (int i = 0; i < restParameters.length; i++) {
- try {
- String parameterValue = null;
- Object o = restParameters[i].getValue();
- if (o instanceof String) {
- parameterValue = (String) o;
- } else if (o != null) {
- parameterValue = o.toString();
- }
- if (parameterValue != null) {
- String parameterName = URLEncoder.encode(restParameters[i].getName(), "UTF-8"); //$NON-NLS-1$
- parameterValue = URLEncoder.encode(parameterValue, "UTF-8"); //$NON-NLS-1$
- nameValueList.add(new NameValuePair(parameterName, parameterValue));
- }
- } catch (UnsupportedEncodingException e) {
- // should not happen
- logException("UnsupportedEncodingException for rest parameter", e); //$NON-NLS-1$
+ String parameterValue = null;
+ Object o = restParameters[i].getValue();
+ if (o instanceof String) {
+ parameterValue = (String) o;
+ } else if (o != null) {
+ parameterValue = o.toString();
+ }
+ if (parameterValue != null) {
+ nameValueList.add(new NameValuePair(restParameters[i].getName(), parameterValue));
}
}
}

Back to the top