Project

General

Profile

« Previous | Next » 

Revision 61159

[Users | Trunk]: Remove encoding from create params

View differences:

modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/utils/HttpUtils.java
11 11
import org.springframework.web.client.RestTemplate;
12 12

  
13 13
import java.io.UnsupportedEncodingException;
14
import java.net.URLDecoder;
14 15
import java.net.URLEncoder;
15 16
import java.nio.charset.Charset;
16 17
import java.nio.charset.StandardCharsets;
......
86 87
        int count = 0;
87 88
        for (Map.Entry<String, String> param : params.entrySet()) {
88 89
            ret.append(param.getKey()).append("=");
89
            try {
90
                ret.append(URLEncoder.encode(param.getValue(), StandardCharsets.UTF_8.toString()));
91
            } catch (UnsupportedEncodingException e) {
92
                logger.error("UnsupportedEncodingException on param " + param);
93
                return null;
94
            }
90
            ret.append(param.getValue());
95 91
            count++;
96 92
            if (count != params.entrySet().size()) {
97 93
                ret.append("&");

Also available in: Unified diff